summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-15 06:34:31 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-15 06:34:31 (GMT)
commit1bcc7ebda225bb7656d932c01288a237b04ffa76 (patch)
tree8068ea7bdb3581a73b7d95ce6acaf2d869d85251 /proc.c
parent7c4b03e775a474c0cbe0cbe9e2eb844ad915e08c (diff)
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
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index 3a86c20..24bd33a 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);
}