diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-24 14:59:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-24 14:59:16 +0000 |
commit | c654349c8b233cca88c497f833ab493d819bda3b (patch) | |
tree | e3c1eb4370b6162dfce372216b0ab06ec561de5b /test/ruby/test_class.rb | |
parent | 96c7f6d30c0d12fc54e41065d1dbd0ef2debd4ed (diff) | |
download | ruby-c654349c8b233cca88c497f833ab493d819bda3b.tar.gz |
test_class.rb: test_namescope_error_message
* test/ruby/test_class.rb (test_namescope_error_message): test for
r53644.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53645 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 81c11e6f88..4f4091d299 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -537,6 +537,14 @@ class TestClass < Test::Unit::TestCase } end + def test_namescope_error_message + m = Module.new + o = m.module_eval "class A\u{3042}; self; end.new" + assert_raise_with_message(TypeError, /A\u{3042}/) { + o::Foo + } + end + def test_redefinition_mismatch m = Module.new m.module_eval "A = 1" |