ruby-changes:45566
From: ko1 <ko1@a...>
Date: Thu, 16 Feb 2017 17:24:41 +0900 (JST)
Subject: [ruby-changes:45566] ko1:r57639 (trunk): use rb_iseq_check() for USE_LAZY_LOAD.
ko1 2017-02-16 17:24:37 +0900 (Thu, 16 Feb 2017) New Revision: 57639 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57639 Log: use rb_iseq_check() for USE_LAZY_LOAD. Modified files: trunk/proc.c Index: proc.c =================================================================== --- proc.c (revision 57638) +++ proc.c (revision 57639) @@ -935,7 +935,7 @@ rb_block_min_max_arity(const struct rb_b https://github.com/ruby/ruby/blob/trunk/proc.c#L935 { switch (vm_block_type(block)) { case block_type_iseq: - return rb_iseq_min_max_arity(block->as.captured.code.iseq, max); + return rb_iseq_min_max_arity(rb_iseq_check(block->as.captured.code.iseq), max); case block_type_proc: return rb_block_min_max_arity(vm_proc_block(block->as.proc), max); case block_type_ifunc: @@ -2253,10 +2253,8 @@ rb_method_entry_min_max_arity(const rb_m https://github.com/ruby/ruby/blob/trunk/proc.c#L2253 return rb_method_entry_min_max_arity(def->body.alias.original_me, max); case VM_METHOD_TYPE_BMETHOD: return rb_proc_min_max_arity(def->body.proc, max); - case VM_METHOD_TYPE_ISEQ: { - const rb_iseq_t *iseq = rb_iseq_check(def->body.iseq.iseqptr); - return rb_iseq_min_max_arity(iseq, max); - } + case VM_METHOD_TYPE_ISEQ: + return rb_iseq_min_max_arity(rb_iseq_check(def->body.iseq.iseqptr), max); case VM_METHOD_TYPE_UNDEF: case VM_METHOD_TYPE_NOTIMPLEMENTED: return *max = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/