summaryrefslogtreecommitdiffstats
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
commite9981d6fa4d2089a4a5db8af32640baec3d28900 (patch)
tree04e0d6b2927569c30d19febf25b8aecb3d06ef7f /eval.c
parentbc8408326beec3dbd293ae59e3e80e0fef5b2028 (diff)
downloadruby-e9981d6fa4d2089a4a5db8af32640baec3d28900.tar.gz
ruby-e9981d6fa4d2089a4a5db8af32640baec3d28900.tar.xz
ruby-e9981d6fa4d2089a4a5db8af32640baec3d28900.zip
* 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: http://svn.ruby-lang.org/repos/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 ade8f043d..0de33223c 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);
}
}