summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-09 01:29:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-09 01:29:24 +0000
commit4c040861c885b7446ae0a7ab786cc7994abf83e4 (patch)
tree5f4c1ef570f4afc4aaa19961cab944695bc4c39f /eval.c
parent9f6de20f5879ea8460e74e2b7bf1e989cc6573cb (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 66b0f43c93..e170dc6efa 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;
}