mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
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
This commit is contained in:
parent
0feaa041e7
commit
63cd3e2b3a
1 changed files with 8 additions and 0 deletions
|
@ -537,6 +537,14 @@ class TestClass < Test::Unit::TestCase
|
||||||
}
|
}
|
||||||
end
|
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
|
def test_redefinition_mismatch
|
||||||
m = Module.new
|
m = Module.new
|
||||||
m.module_eval "A = 1"
|
m.module_eval "A = 1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue