summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-06 07:30:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-06 07:30:13 +0000
commitd77119bfe463a3eeb7b3b6995dec697ebb6be85d (patch)
tree04e0d6b2927569c30d19febf25b8aecb3d06ef7f /eval.c
parent6bebc82c03b6eb196280bbdd54eed6d7cb25a9c1 (diff)
* io.c (rb_io_readlines): avoid calling GetOpenFile() repeatedly.
* io.c (rb_io_each_line): ditto. * io.c (argf_getline): ditto. * process.c: should include <time.h> to get proper CLK_TCK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index ade8f043d8..0de33223c4 100644
--- a/eval.c
+++ b/eval.c
@@ -4669,10 +4669,12 @@ rb_call(klass, recv, mid, argc, argv, scope)
/* self must be kind of a specified form for private method */
if ((noex & NOEX_PROTECTED)) {
- if (TYPE(klass) == T_ICLASS) {
- klass = RBASIC(klass)->klass;
+ VALUE defined_class = klass;
+
+ if (TYPE(defined_class) == T_ICLASS) {
+ defined_class = RBASIC(defined_class)->klass;
}
- if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(klass)))
+ if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(defined_class)))
return rb_undefined(recv, mid, argc, argv, CSTAT_PROT);
}
}