diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-29 17:47:59 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-29 17:47:59 +0000 |
commit | 0c03a89ecd71ebdc1ea983264424ba5c46f8c4e1 (patch) | |
tree | f8f8bafda5ff2fcbe9eb8c71b51440bc270d01ad /test/ruby/test_module.rb | |
parent | 6186e5201afaf517357e748689c7c4fdca8a0f9d (diff) |
Make Module#{define|alias|undef|remove}_method public [#14133]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 29236644bf..d3e08a1fbb 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -2038,6 +2038,10 @@ class TestModule < Test::Unit::TestCase attr_accessor attr_reader attr_writer + define_method + alias_method + undef_method + remove_method ] assert_equal public_methods.sort, (Module.public_methods & public_methods).sort end @@ -2104,9 +2108,9 @@ class TestModule < Test::Unit::TestCase def test_visibility_by_public_class_method bug8284 = '[ruby-core:54404] [Bug #8284]' - assert_raise(NoMethodError) {Object.define_method} - Module.new.public_class_method(:define_method) - assert_raise(NoMethodError, bug8284) {Object.define_method} + assert_raise(NoMethodError) {Object.remove_const} + Module.new.public_class_method(:remove_const) + assert_raise(NoMethodError, bug8284) {Object.remove_const} end def test_include_module_with_constants_does_not_invalidate_method_cache |