mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_obj_instance_eval): use class of immediate objects.
* test/ruby/test_eval.rb: fix a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b507930297
commit
85143195da
3 changed files with 8 additions and 2 deletions
|
@ -341,7 +341,7 @@ class TestEval < Test::Unit::TestCase
|
|||
def test_cvar_scope_with_instance_eval
|
||||
Fixnum.class_eval "@@test_cvar_scope_with_instance_eval = 1" # depends on [ruby-dev:24229]
|
||||
@@test_cvar_scope_with_instance_eval = 4
|
||||
assert_equal(4, 1.instance_eval("@@test_cvar_scope_with_instance_eval"), "[ruby-dev:24223]")
|
||||
assert_equal(1, 1.instance_eval("@@test_cvar_scope_with_instance_eval"), "[ruby-dev:24223]")
|
||||
Fixnum.__send__(:remove_class_variable, :@@test_cvar_scope_with_instance_eval)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue