diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-07 06:41:32 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-07 06:41:32 +0000 |
commit | 7519688ed86cb8b423fd24d4e27964056e78bc9b (patch) | |
tree | 4da19d177860b3f3e90d8cf575c69a0397c1c9b3 /vm.c | |
parent | 5c79f6dbb7eed53bdd693adece7c28e422d71b53 (diff) |
introduce imemo_type_p(v, imemo_type)
* internal.h: introduce imemo_type_p() which checks the given value is
T_IMEMO and imemo_type() == given imemo_type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -864,7 +864,8 @@ rb_vm_make_proc_lambda(rb_thread_t *th, const struct rb_captured_block *captured vm_make_env_object(th, cfp); } VM_ASSERT(VM_EP_IN_HEAP_P(th, captured->ep)); - VM_ASSERT(RB_TYPE_P(captured->code.val, T_IMEMO)); + VM_ASSERT(imemo_type_p(captured->code.val, imemo_iseq) || + imemo_type_p(captured->code.val, imemo_ifunc)); procval = rb_proc_create_from_captured(klass, captured, imemo_type(captured->code.val) == imemo_iseq ? block_type_iseq : block_type_ifunc, |