diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-28 16:35:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-28 16:35:58 +0000 |
commit | fe994a4d043acf4bfa9d2a94bfbd691bb9556d4c (patch) | |
tree | 3169d6dba0c3d09903e77659ed73af00f14c1766 /test/ruby/test_class.rb | |
parent | da70f4d02a5251605bc6a44940a7784f9f613fcb (diff) | |
download | ruby-fe994a4d043acf4bfa9d2a94bfbd691bb9556d4c.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_class.rb')
-rw-r--r-- | test/ruby/test_class.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 3508061840..efee102835 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -522,4 +522,12 @@ class TestClass < Test::Unit::TestCase assert_equal(m, m.xyzzy, "Bug #10871") } end + + def test_redefinition_mismatch + m = Module.new + m.module_eval "A = 1" + assert_raise_with_message(TypeError, /is not a class/) { + m.module_eval "class A; end" + } + end end |