diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-27 16:45:36 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-27 16:45:36 +0000 |
commit | 109d71ac71cab09d415a489deb39191735d9d00c (patch) | |
tree | f2c9bdf67b3dd3e1497b32ff663449142d081629 /test | |
parent | 3e81553a1e6d71a1f8c528581c317e34f245f200 (diff) | |
download | ruby-109d71ac71cab09d415a489deb39191735d9d00c.tar.gz |
* variable.c (rb_mod_remove_const): fix segv caused by r38558.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 52f643489c..2862cd338f 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1591,4 +1591,9 @@ class TestModule < Test::Unit::TestCase end assert_equal("", stderr) end + + def test_remove_const + m = Module.new + assert_raise(NameError){ m.instance_eval { remove_const(:__FOO__) } } + end end |