diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-16 08:24:37 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-16 08:24:37 +0000 |
commit | a17384301bc06aa9b62c36fe337fdacfbaf97b42 (patch) | |
tree | 8557f5b10d4ec16302f5273a9ef151a6165cacfd /proc.c | |
parent | f4e0086d80843c363d2676a038fdefe864a3288b (diff) | |
download | ruby-a17384301bc06aa9b62c36fe337fdacfbaf97b42.tar.gz |
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
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; |