summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb10
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