From 0d069bd2df3ea467efb1d9d3a64ae2334b5cc241 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 23 Oct 2010 09:37:26 +0000 Subject: [PATCH] merges r29140 and r29141 from trunk into ruby_1_9_2. -- * lib/rdoc/parser/ruby.rb (RDoc#parse_class): ignore non-constant name signleton class. [Bug #3759], [ruby-dev:42154] -- * lib/rdoc/parser/ruby.rb (RDoc#parse_call_parameters): don't include assignment. [Bug #3759], [ruby-dev:42154] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ lib/rdoc/parser/ruby.rb | 4 ++-- test/rdoc/test_rdoc_parser_ruby.rb | 2 ++ version.h | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf8620b82f..d463424884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Aug 29 23:54:10 2010 Nobuyoshi Nakada + + * lib/rdoc/parser/ruby.rb (RDoc#parse_call_parameters): don't + include assignment. [Bug #3759], [ruby-dev:42154] + + * lib/rdoc/parser/ruby.rb (RDoc#parse_class): ignore non-constant + name signleton class. [Bug #3759], [ruby-dev:42154] + Sat Sep 25 22:48:30 2010 Nobuyoshi Nakada * configure.in (LIBRUBY_DLDFLAGS): fix quoting. diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index 1876c339fa..bfb118c416 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -526,7 +526,7 @@ class RDoc::Parser::Ruby < RDoc::Parser else break unless @scanner.continue end - when TkCOMMENT + when TkCOMMENT, TkASSIGN, TkOPASGN unget_tk(tk) break when nil then @@ -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 diff --git a/version.h b/version.h index 438f62ceee..8494aa67b3 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 21 +#define RUBY_PATCHLEVEL 22 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1