RDoc::usage dies on markup in heading

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

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

Cheers

Dave

···

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:

Dave Thomas 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!

···

On Dec 30, 2004, at 6:13 PM, Stefan Lang wrote:

--
Stefan