mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/servlet.rb: Fixed display of site and home documentation.
Fixes rdoc issue #170 by Thomas Leitner. * test/rdoc/test_rdoc_servlet.rb: Test for above. * lib/rdoc/code_object.rb: Split #initialize_visibility from #initialize for reuse when loading a stored object. Fixes rdoc issue #171 by Thomas Leitner. * lib/rdoc/any_method.rb: Initialize visibility for #display? For rdoc issue #171 * lib/rdoc/attr.rb: ditto. * lib/rdoc/class_module.rb: ditto. * lib/rdoc/top_level.rb: ditto. * test/rdoc/test_rdoc_any_method.rb: Test for above. * test/rdoc/test_rdoc_attr.rb: ditto. * test/rdoc/test_rdoc_class_module.rb: ditto. * test/rdoc/test_rdoc_constant.rb: ditto. * test/rdoc/test_rdoc_top_level.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
95548d9dc3
commit
5864dbc9f1
13 changed files with 110 additions and 12 deletions
|
@ -100,24 +100,31 @@ method(a, b) { |c, d| ... }
|
|||
assert_equal section, loaded.section
|
||||
end
|
||||
|
||||
def test_marshal_load
|
||||
instance_method = Marshal.load Marshal.dump(@c1.method_list.last)
|
||||
|
||||
assert_equal 'C1#m', instance_method.full_name
|
||||
assert_equal 'C1', instance_method.parent_name
|
||||
assert_equal '(foo)', instance_method.params
|
||||
|
||||
def test_marshal_load_aliased_method
|
||||
aliased_method = Marshal.load Marshal.dump(@c2.method_list.last)
|
||||
|
||||
assert_equal 'C2#a', aliased_method.full_name
|
||||
assert_equal 'C2', aliased_method.parent_name
|
||||
assert_equal '()', aliased_method.params
|
||||
assert aliased_method.display?
|
||||
end
|
||||
|
||||
def test_marshal_load_class_method
|
||||
class_method = Marshal.load Marshal.dump(@c1.method_list.first)
|
||||
|
||||
assert_equal 'C1::m', class_method.full_name
|
||||
assert_equal 'C1', class_method.parent_name
|
||||
assert_equal '()', class_method.params
|
||||
assert class_method.display?
|
||||
end
|
||||
|
||||
def test_marshal_load_instance_method
|
||||
instance_method = Marshal.load Marshal.dump(@c1.method_list.last)
|
||||
|
||||
assert_equal 'C1#m', instance_method.full_name
|
||||
assert_equal 'C1', instance_method.parent_name
|
||||
assert_equal '(foo)', instance_method.params
|
||||
assert instance_method.display?
|
||||
end
|
||||
|
||||
def test_marshal_load_version_0
|
||||
|
@ -163,6 +170,8 @@ method(a, b) { |c, d| ... }
|
|||
assert_equal nil, loaded.file
|
||||
assert_equal cm, loaded.parent
|
||||
assert_equal section, loaded.section
|
||||
|
||||
assert loaded.display?
|
||||
end
|
||||
|
||||
def test_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue