diff options
Diffstat (limited to 'test/ruby/test_module.rb')
| -rw-r--r-- | test/ruby/test_module.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 1e0f154bd2..06c1820853 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1675,6 +1675,13 @@ class TestModule < Test::Unit::TestCase end end + def test_anonymous_module_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} + end + private def assert_top_method_is_private(method) |
