diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 04:06:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 04:06:34 +0000 |
commit | 99058e83be0849cf2995d60da10e4d19adbc1349 (patch) | |
tree | ca98781a11e8f66be5fa231853031fc1134a98d5 /test | |
parent | c0ea75f966dd6b402ff2d7016eeeaef12f95ebdf (diff) | |
download | ruby-99058e83be0849cf2995d60da10e4d19adbc1349.tar.gz |
* test/ruby/test_module.rb (test_uninitialized_toplevel_constant): test for [ruby-dev:40951].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index c2084a2e72..77598e957f 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -920,4 +920,10 @@ class TestModule < Test::Unit::TestCase y.bar end end + + def test_uninitialized_toplevel_constant + bug3123 = '[ruby-dev:40951]' + e = assert_raise(NameError) {eval("Bug3123", TOPLEVEL_BINDING)} + assert_not_match(/Object::/, e.message, bug3123) + end end |