ruby-changes:2966
From: ko1@a...
Date: 22 Dec 2007 11:52:40 +0900
Subject: [ruby-changes:2966] ko1 - Ruby:r14457 (trunk): * eval.c (rb_obj_instance_eval): use class of immediate objects.
ko1 2007-12-22 11:52:27 +0900 (Sat, 22 Dec 2007) New Revision: 14457 Modified files: trunk/ChangeLog trunk/eval.c trunk/test/ruby/test_eval.rb Log: * eval.c (rb_obj_instance_eval): use class of immediate objects. * test/ruby/test_eval.rb: fix a test. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14457&r2=14456 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/eval.c?r1=14457&r2=14456 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_eval.rb?r1=14457&r2=14456 Index: ChangeLog =================================================================== --- ChangeLog (revision 14456) +++ ChangeLog (revision 14457) @@ -1,3 +1,9 @@ +Sat Dec 22 11:47:42 2007 Koichi Sasada <ko1@a...> + + * eval.c (rb_obj_instance_eval): use class of immediate objects. + + * test/ruby/test_eval.rb: fix a test. + Sat Dec 22 11:37:06 2007 NAKAMURA Usaku <usa@r...> * encoding.c (rb_locale_charmap): win32 support. Index: eval.c =================================================================== --- eval.c (revision 14456) +++ eval.c (revision 14457) @@ -1998,7 +1998,7 @@ VALUE klass; if (SPECIAL_CONST_P(self)) { - klass = Qnil; + klass = CLASS_OF(self); //klass = Qnil; } else { klass = rb_singleton_class(self); Index: test/ruby/test_eval.rb =================================================================== --- test/ruby/test_eval.rb (revision 14456) +++ test/ruby/test_eval.rb (revision 14457) @@ -341,7 +341,7 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml