mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use rb_iseq_check() for USE_LAZY_LOAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f4e0086d80
commit
a17384301b
1 changed files with 3 additions and 5 deletions
8
proc.c
8
proc.c
|
@ -935,7 +935,7 @@ rb_block_min_max_arity(const struct rb_block *block, int *max)
|
|||
{
|
||||
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_method_entry_t *me, int *max)
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue