Bug #683: rdoc fails on singleton method of Object
http://redmine.ruby-lang.org/issues/show/683

Author: caleb clausen
Status: Open, Priority: Normal

Rdoc gives an error when given this code:

  def Object.b
  end

The error I see is:
caleb@play:~/tmp$ rdoc ab.rb 

                              ab.rb: .

RDoc failure in ab.rb at or around line 1 column 12

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:

/usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1918:in `parse_method': undefined method `name' for nil:NilClass (NoMethodError)
        from /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1636:in `parse_statements'
        from /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1569:in `parse_toplevel_statements'
        from /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1405:in `scan'

This is occurring for me in ruby 1.8.6 and 1.8.7, but not 1.9.


----------------------------------------
http://redmine.ruby-lang.org