diff options
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index bdf699536d..e91d2c8a93 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -2066,6 +2066,14 @@ class TestModule < Test::Unit::TestCase end end + def test_redefinition_mismatch + m = Module.new + m.module_eval "A = 1" + assert_raise_with_message(TypeError, /is not a module/) { + m.module_eval "module A; end" + } + end + private def assert_top_method_is_private(method) |