ruby-changes:51149
From: hsbt <ko1@a...>
Date: Tue, 8 May 2018 11:07:59 +0900 (JST)
Subject: [ruby-changes:51149] hsbt:r63356 (trunk): Merge rdoc-6.0.4 from upstream.
hsbt 2018-05-08 11:07:53 +0900 (Tue, 08 May 2018) New Revision: 63356 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63356 Log: Merge rdoc-6.0.4 from upstream. Modified files: trunk/lib/rdoc/parser/ruby.rb trunk/lib/rdoc.rb trunk/test/rdoc/test_rdoc_parser_ruby.rb Index: lib/rdoc.rb =================================================================== --- lib/rdoc.rb (revision 63355) +++ lib/rdoc.rb (revision 63356) @@ -65,7 +65,7 @@ module RDoc https://github.com/ruby/ruby/blob/trunk/lib/rdoc.rb#L65 ## # RDoc version you are using - VERSION = '6.0.3' + VERSION = '6.0.4' ## # Method visibilities Index: lib/rdoc/parser/ruby.rb =================================================================== --- lib/rdoc/parser/ruby.rb (revision 63355) +++ lib/rdoc/parser/ruby.rb (revision 63356) @@ -363,6 +363,7 @@ class RDoc::Parser::Ruby < RDoc::Parser https://github.com/ruby/ruby/blob/trunk/lib/rdoc/parser/ruby.rb#L363 container ||= if ignore_constants then c = RDoc::NormalModule.new name_t[:text] + c.store = @store new_modules << [prev_container, c] c else Index: test/rdoc/test_rdoc_parser_ruby.rb =================================================================== --- test/rdoc/test_rdoc_parser_ruby.rb (revision 63355) +++ test/rdoc/test_rdoc_parser_ruby.rb (revision 63356) @@ -4018,63 +4018,4 @@ end https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_parser_ruby.rb#L4018 assert_equal ['A', 'B', 'B::C'], visible end - def test_parse_const_alias_defined_elsewhere - util_parser <<-CLASS -module A - Aliased = Defined -end - -module A - class Defined - end -end - CLASS - - @parser.scan - - a = @top_level.modules.first - assert_equal 'A', a.full_name - aliased = a.constants.first - assert_equal 'A::Aliased', aliased.full_name - - visible = @store.all_modules.reject { |mod| mod.suppressed? } - visible = visible.map { |mod| mod.full_name } - - assert_equal ['A'], visible - end - - def test_parse_const_alias_defined_far_away - util_parser <<-CLASS -module A - Aliased = ::B::C::Defined -end - -module B - module C - class Defined - end - end -end - CLASS - - @parser.scan - - a = @top_level.modules.first - assert_equal 'A', a.full_name - assert_empty a.classes - assert_empty a.modules - assert_equal ['A::Aliased'], a.constants.map(&:full_name) - - defined = @store.find_class_named 'B::C::Defined' - assert_equal 'B::C::Defined', defined.full_name - - aliased = @store.find_class_named 'B::C::Aliased' - assert_equal 'B::C::Aliased', aliased.full_name - - visible = @store.all_modules.reject { |mod| mod.suppressed? } - visible = visible.map { |mod| mod.full_name } - - assert_equal ['A', 'B', 'B::C'], visible - end - end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/