From dd6a68ac51ec79ea3f7884f074468e00f268bb62 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 15 Oct 2015 06:34:31 +0000 Subject: proc.c: iseq conditions * proc.c (rb_block_min_max_arity, rb_mod_define_method): use RUBY_VM_NORMAL_ISEQ_P() to check if iseq. * proc.c (make_curry_proc): IS_METHOD_PROC_ISEQ() includes RUBY_VM_IFUNC_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 3a86c20a35..24bd33a675 100644 --- a/proc.c +++ b/proc.c @@ -872,7 +872,7 @@ rb_block_min_max_arity(rb_block_t *block, int *max) const rb_iseq_t *iseq = block->iseq; if (iseq) { - if (!RUBY_VM_IFUNC_P(iseq)) { + if (RUBY_VM_NORMAL_ISEQ_P(iseq)) { return rb_iseq_min_max_arity(iseq, max); } else { @@ -1780,7 +1780,7 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod) rb_proc_t *proc; body = proc_dup(body); GetProcPtr(body, proc); - if (!RUBY_VM_IFUNC_P(proc->block.iseq)) { + if (RUBY_VM_NORMAL_ISEQ_P(proc->block.iseq)) { proc->is_lambda = TRUE; proc->is_from_method = TRUE; } @@ -2610,7 +2610,7 @@ proc_binding(VALUE self) bind->env = envval; if (!RUBY_VM_NORMAL_ISEQ_P(iseq)) { - if (RUBY_VM_IFUNC_P(iseq) && IS_METHOD_PROC_ISEQ(iseq)) { + if (IS_METHOD_PROC_ISEQ(iseq)) { VALUE method = (VALUE)((struct vm_ifunc *)iseq)->data; iseq = rb_method_iseq(method); } -- cgit v1.2.3