ruby-changes:4915
From: ko1@a...
Date: Wed, 14 May 2008 07:53:17 +0900 (JST)
Subject: [ruby-changes:4915] matz - Ruby:r16408 (trunk): * eval.c (rb_call0): defer calling of rb_frame_self() until it
matz 2008-05-14 07:53:01 +0900 (Wed, 14 May 2008) New Revision: 16408 Modified files: trunk/ChangeLog trunk/eval.c Log: * eval.c (rb_call0): defer calling of rb_frame_self() until it become really necessary. * eval.c (rb_call): ditto. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16408&r2=16407&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/eval.c?r1=16408&r2=16407&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 16407) +++ ChangeLog (revision 16408) @@ -1,3 +1,10 @@ +Wed May 14 07:49:35 2008 Yukihiro Matsumoto <matz@r...> + + * eval.c (rb_call0): defer calling of rb_frame_self() until it + become really necessary. + + * eval.c (rb_call): ditto. + Wed May 14 00:55:56 2008 Yusuke Endoh <mame@t...> * test/ruby/test_io_m17n.rb: remove a duplicative method. Index: eval.c =================================================================== --- eval.c (revision 16407) +++ eval.c (revision 16408) @@ -1412,7 +1412,10 @@ if (TYPE(defined_class) == T_ICLASS) { defined_class = RBASIC(defined_class)->klass; } - + + if (self == Qundef) { + self = rb_frame_self(); + } if (!rb_obj_is_kind_of(self, rb_class_real(defined_class))) { return method_missing(recv, mid, argc, argv, NOEX_PROTECTED); } @@ -1450,7 +1453,7 @@ static VALUE rb_call(VALUE klass, VALUE recv, ID mid, int argc, const VALUE *argv, int scope) { - return rb_call0(klass, recv, mid, argc, argv, scope, rb_frame_self()); + return rb_call0(klass, recv, mid, argc, argv, scope, Qundef); } VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/