summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-13 22:53:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-13 22:53:01 +0000
commit0e0229f3026c50df1c0ac5b66b4a26b6b8aedb60 (patch)
treee382f01726989a7f1aa736e9a29b11413a0b770c
parent759c6d2a89a955d43694a98a47b12cde2e26d14c (diff)
* 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
-rw-r--r--ChangeLog7
-rw-r--r--eval.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 48bb852..1f7e7bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* test/ruby/test_io_m17n.rb: remove a duplicative method.
diff --git a/eval.c b/eval.c
index d85fe85..f79854d 100644
--- a/eval.c
+++ b/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) {
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 @@ rb_call0(VALUE klass, VALUE recv, ID mid, int argc, const VALUE *argv, int scope
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