diff options
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index e6c107961d..1aa7f8c691 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -495,6 +495,9 @@ class TestModule < Test::Unit::TestCase def test_const_get_invalid_name c1 = Class.new assert_raise(NameError) { c1.const_defined?(:foo) } + name = "gadzooks" + assert !Symbol.all_symbols.any? {|sym| sym.to_s == name} + assert_raise(NameError) { c1.const_defined?(name) } end def test_const_get_no_inherited |