diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 2 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_parser_ruby.rb | 2 |
3 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun Aug 29 23:46:54 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/rdoc/parser/ruby.rb (RDoc#parse_class): ignore non-constant + name signleton class. [Bug #3759], [ruby-dev:42154] + Sun Aug 29 23:25:18 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (rb_get_path_check): clarify error message for diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index 1876c339fa..c27d5fa0fd 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -568,7 +568,7 @@ class RDoc::Parser::Ruby < RDoc::Parser case name = get_class_specification when "self", container.name parse_statements container, SINGLE - else + when /\A[A-Z]/ other = RDoc::TopLevel.find_class_named name unless other then diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb index 988bc507cd..33ffded723 100644 --- a/test/rdoc/test_rdoc_parser_ruby.rb +++ b/test/rdoc/test_rdoc_parser_ruby.rb @@ -429,6 +429,8 @@ end class A class << B end + class << d = Object.new + end end CODE |