[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RDoc::usage dies on markup in heading

Stefan Lang

12/31/2004 12:14:00 AM

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


2 Answers

Dave Thomas

12/31/2004 5:23:00 AM

0


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



Stefan Lang

12/31/2004 10:19:00 AM

0

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