зеркало из https://github.com/github/ruby.git
Merge rdoc-6.0.4 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f5f218f7c2
Коммит
e75d8e0c65
|
@ -65,7 +65,7 @@ module RDoc
|
|||
##
|
||||
# RDoc version you are using
|
||||
|
||||
VERSION = '6.0.3'
|
||||
VERSION = '6.0.4'
|
||||
|
||||
##
|
||||
# Method visibilities
|
||||
|
|
|
@ -363,6 +363,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
|
|||
container ||=
|
||||
if ignore_constants then
|
||||
c = RDoc::NormalModule.new name_t[:text]
|
||||
c.store = @store
|
||||
new_modules << [prev_container, c]
|
||||
c
|
||||
else
|
||||
|
|
|
@ -3990,65 +3990,6 @@ 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
|
||||
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче