RDoc::usage dies on markup in heading

Discussion in 'Ruby' started by Stefan Lang, Dec 31, 2004.

  1. Stefan Lang

    Stefan Lang Guest

    This script:

    # == +Test+ for RDoc::usage
    #
    # RDoc formats this as HTML without problems
    # but dies when formatted with RDoc::usage

    require 'rdoc/usage'
    RDoc::usage

    fails with the the following message:
    /usr/lib/ruby/1.8/rdoc/markup/simple_markup/inline.rb:23:in `as_string':
    undefined method `zero?' for nil:NilClass (NoMethodError)
    from /usr/lib/ruby/1.8/rdoc/markup/simple_markup/inline.rb:47:in
    `to_s'
    from /usr/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:167:in `join'
    from /usr/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:167:in
    `display_flow_item'
    from /usr/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:211:in `display_flow'
    from /usr/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:210:in `each'
    from /usr/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:210:in `display_flow'
    from /usr/lib/ruby/1.8/rdoc/usage.rb:122:in `usage_no_exit'
    from /usr/lib/ruby/1.8/rdoc/usage.rb:93:in `usage'
    from ./rdoc_usage.rb:9

    If I run rdoc to generate HTML, it works as expected.
    RDoc::usage works if I remove the markup for "Test"
    in the heading.
    Is this an rdoc bug?

    --
    Stefan
    Stefan Lang, Dec 31, 2004
    #1
    1. Advertising

  2. Stefan Lang

    Dave Thomas Guest

    On Dec 30, 2004, at 6:13 PM, Stefan Lang wrote:
    > # == +Test+ for RDoc::usage
    > #
    > # RDoc formats this as HTML without problems
    > # but dies when formatted with RDoc::usage
    >
    > require 'rdoc/usage'
    > RDoc::usage
    >
    > fails with the the following message:


    Thanks for the report and the great test case. I've fixed it in the 1.8
    and 1.9 CVS.

    Cheers


    Dave
    Dave Thomas, Dec 31, 2004
    #2
    1. Advertising

  3. Stefan Lang

    Stefan Lang Guest

    Dave Thomas wrote:

    >
    > On Dec 30, 2004, at 6:13 PM, Stefan Lang wrote:
    >> # == +Test+ for RDoc::usage
    >> #
    >> # RDoc formats this as HTML without problems
    >> # but dies when formatted with RDoc::usage
    >>
    >> require 'rdoc/usage'
    >> RDoc::usage
    >>
    >> fails with the the following message:

    >
    > Thanks for the report and the great test case. I've fixed it in the 1.8
    > and 1.9 CVS.
    >
    > Cheers
    >
    >
    > Dave


    Great, thanks for your fast response!

    --
    Stefan
    Stefan Lang, Dec 31, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary Wright

    rdoc markup question

    Gary Wright, Apr 30, 2007, in forum: Ruby
    Replies:
    3
    Views:
    108
    Gary Wright
    Apr 30, 2007
  2. Peter Marsh

    RDoc markup

    Peter Marsh, Jun 10, 2007, in forum: Ruby
    Replies:
    2
    Views:
    103
    Eric Hodel
    Jun 12, 2007
  3. Serg Koren

    Proper way to RDoc markup?

    Serg Koren, Feb 15, 2008, in forum: Ruby
    Replies:
    11
    Views:
    229
    Tony Strauss
    Sep 27, 2008
  4. Intransition

    Better RDoc Inline Markup

    Intransition, Sep 3, 2009, in forum: Ruby
    Replies:
    11
    Views:
    186
    trans
    Sep 5, 2009
  5. Christopher M. Lusardi
    Replies:
    3
    Views:
    192
    Alan J. Flavell
    Oct 19, 2003
Loading...

Share This Page