зеркало из https://github.com/github/ruby.git
* eval.c (rb_call0): defer calling of rb_frame_self() until it
become really necessary. * eval.c (rb_call): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
759c6d2a89
Коммит
0e0229f302
|
@ -1,3 +1,10 @@
|
||||||
|
Wed May 14 07:49:35 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@tsg.ne.jp>
|
Wed May 14 00:55:56 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* test/ruby/test_io_m17n.rb: remove a duplicative method.
|
* test/ruby/test_io_m17n.rb: remove a duplicative method.
|
||||||
|
|
7
eval.c
7
eval.c
|
@ -1412,7 +1412,10 @@ rb_call0(VALUE klass, VALUE recv, ID mid, int argc, const VALUE *argv, int scope
|
||||||
if (TYPE(defined_class) == T_ICLASS) {
|
if (TYPE(defined_class) == T_ICLASS) {
|
||||||
defined_class = RBASIC(defined_class)->klass;
|
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))) {
|
if (!rb_obj_is_kind_of(self, rb_class_real(defined_class))) {
|
||||||
return method_missing(recv, mid, argc, argv, NOEX_PROTECTED);
|
return method_missing(recv, mid, argc, argv, NOEX_PROTECTED);
|
||||||
}
|
}
|
||||||
|
@ -1450,7 +1453,7 @@ rb_call0(VALUE klass, VALUE recv, ID mid, int argc, const VALUE *argv, int scope
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_call(VALUE klass, VALUE recv, ID mid, int argc, const VALUE *argv, int scope)
|
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
|
VALUE
|
||||||
|
|
Загрузка…
Ссылка в новой задаче