ruby-changes:40050
From: nobu <ko1@a...>
Date: Thu, 15 Oct 2015 15:35:23 +0900 (JST)
Subject: [ruby-changes:40050] nobu:r52131 (trunk): proc.c: iseq conditions
nobu 2015-10-15 15:34:31 +0900 (Thu, 15 Oct 2015) New Revision: 52131 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52131 Log: 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(). Modified files: trunk/proc.c Index: proc.c =================================================================== --- proc.c (revision 52130) +++ proc.c (revision 52131) @@ -872,7 +872,7 @@ rb_block_min_max_arity(rb_block_t *block https://github.com/ruby/ruby/blob/trunk/proc.c#L872 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 *ar https://github.com/ruby/ruby/blob/trunk/proc.c#L1780 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) https://github.com/ruby/ruby/blob/trunk/proc.c#L2610 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/