aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 16:35:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 16:35:58 +0000
commit90d822d442a598811e23a2059442db892462bc3d (patch)
tree3169d6dba0c3d09903e77659ed73af00f14c1766 /test/ruby/test_module.rb
parente9ac265c39c3a973f7ad55013188ac68804d3f90 (diff)
downloadruby-90d822d442a598811e23a2059442db892462bc3d.tar.gz
test_redefinition_mismatch
* test/ruby/test_{class,module}.rb (test_redefinition_mismatch): add tests of redefinition mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb8
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)