summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_module.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 3306c0db74..e3b433e2cb 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -948,6 +948,10 @@ class TestModule < Test::Unit::TestCase
assert_raise(NameError) { c::FOO }
assert_equal("foo", c.class_eval("FOO"))
assert_equal("foo", c.const_get("FOO"))
+ $VERBOSE, verbose = nil, $VERBOSE
+ c.const_set(:FOO, "foo")
+ $VERBOSE = verbose
+ assert_raise(NameError) { c::FOO }
end
class PrivateClass