Bug #1037
closedRDoc 2.2.2 crashes on comments beginning with '##'
Description
=begin
RDoc 2.2.2 (which is bundled with Ruby 1.9.1-rc2) crashes
when processing comments that begin with two '##' comment
characters. Please observe:
./ruby --version
ruby 1.9.1p0 (2009-01-20 revision 21700) [i686-linux]
rdoc --version
rdoc 2.2.2
cat foo
#!/usr/bin/ruby -w
this is a comment¶
this_is_some_code
./ruby bin/rdoc foo --op foo-out
foo:
RDoc failure in dummy.rb at or around line 7 column
0
Before reporting this, could you check that the file you're documenting
compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if
fed invalid programs.
The internal error was:
/home/sun/app/ruby19/lib/ruby/1.9.1/rdoc/parser/ruby.rb:2049:in parse_meta_method': undefined method
top_level' for #<RDoc::TopLevel:0x4688856 "foo" modules: [] classes: []> (NoMethodError)
from /home/sun/app/ruby19/lib/ruby/1.9.1/rdoc/parser/ruby.rb:2445:in parse_statements' from /home/sun/app/ruby19/lib/ruby/1.9.1/rdoc/parser/ruby.rb:2540:in
parse_toplevel_statements'
from /home/sun/app/ruby19/lib/ruby/1.9.1/rdoc/parser/ruby.rb:2706:in `block (2 levels) in scan'
##################################
In contrast, when I do NOT use a double '##' RDoc is OK:
##################################
cat bar
#!/usr/bin/ruby -w
this is a comment¶
this_is_some_code
./ruby bin/rdoc bar --op bar-out
bar:
Generating HTML...
Files: 1
Classes: 0
Modules: 0
Methods: 0
Elapsed: 0.0s
##################################
Thanks for your consideration.
=end
Updated by yugui (Yuki Sonoda) almost 16 years ago
- Target version changed from 1.9.1 RC2 to 1.9.1
=begin
=end
Updated by sunaku (Suraj Kurapati) almost 16 years ago
=begin
This bug has been fixed in the RDoc 2.3.0 gem.
=end
Updated by sunaku (Suraj Kurapati) almost 16 years ago
=begin
If Ruby 1.9 will use RDoc 2.3.0 instead of RDoc 2.2.2, then this bug can be closed. Thanks.
=end
Updated by yugui (Yuki Sonoda) almost 16 years ago
- Target version changed from 1.9.1 to 1.9.2
- ruby -v set to -
=begin
=end
Updated by matz (Yukihiro Matsumoto) almost 16 years ago
- Status changed from Open to Closed
=begin
=end