diff options
Diffstat (limited to 'test/ruby/test_module.rb')
| -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 3373594fe3..6a7f566ac7 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -403,6 +403,11 @@ class TestModule < Test::Unit::TestCase p Module.constants - ary, Module.constants(true), Module.constants(false) INPUT assert_in_out_err([], src, %w([:M] [:WALTER] []), []) + + klass = Class.new do + const_set(:X, 123) + end + assert_equal(false, klass.class_eval { Module.constants }.include?(:X)) end module M1 |
