diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-31 05:54:34 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-31 05:54:34 +0000 |
commit | e3d7e34e7e34b97ede54b29a4492daaab321de2f (patch) | |
tree | 00b2390a6a3c78c444d520bc7b76daad5dcdd22c /test/ruby/test_module.rb | |
parent | 633cf770f0ec5aa3d44e46c6997c3939fec73eef (diff) | |
download | ruby-e3d7e34e7e34b97ede54b29a4492daaab321de2f.tar.gz |
* eval.c (rb_mod_s_constants): should ignore crefs with
the NODE_FL_CREF_PUSHED_BY_EVAL flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 |