RDoc::usage dies on markup in heading

S

Stefan Lang

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?
 
D

Dave Thomas

# == +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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top