mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 10:03:59 +02:00
* 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
This commit is contained in:
parent
633cf770f0
commit
e3d7e34e7e
3 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue