From 66275ebe7cd7a9872daabb67e19255f4e1e7b163 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Nov 2007 01:29:24 +0000 Subject: * eval.c (rb_invoke_method): check if invoked in function style. [ruby-core:13245] * insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): stores and returns VM calling flags. * vm.c (rb_vm_cfunc_funcall_p): returns if the current method is invoked in function style. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 66b0f43c9..e170dc6ef 100644 --- a/eval.c +++ b/eval.c @@ -1507,11 +1507,11 @@ rb_f_send(int argc, VALUE *argv, VALUE recv) VALUE rb_invoke_method(int argc, VALUE *argv, VALUE recv) { + int rb_vm_cfunc_funcall_p(rb_control_frame_t *); int scope = NOEX_PUBLIC; rb_thread_t *th = GET_THREAD(); - rb_control_frame_t *cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp); - if (SPECIAL_CONST_P(cfp->sp[0])) { + if (rb_vm_cfunc_funcall_p(th->cfp)) { scope = NOEX_NOSUPER | NOEX_PRIVATE; } -- cgit