diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-04 04:44:16 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-04 04:44:16 +0000 |
commit | 1e4be7a8527e0dff1c0172c53737f5d755149d21 (patch) | |
tree | 4a0b629838a920828ae4a341080588183569a108 /iseq.c | |
parent | 9edca48cffa91a6e267d77c538ed690529666537 (diff) |
iseq.c (rb_iseq_new_with_opt): handle the case where node is imemo_func
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -519,9 +519,11 @@ rb_iseq_new_with_opt(const NODE *node, VALUE name, VALUE path, VALUE realpath, { /* TODO: argument check */ rb_iseq_t *iseq = iseq_alloc(); + const rb_code_range_t *code_range = NULL; if (!option) option = &COMPILE_OPTION_DEFAULT; - prepare_iseq_build(iseq, name, path, realpath, first_lineno, node ? &node->nd_loc : NULL, parent, type, option); + if (node && !imemo_type_p((VALUE)node, imemo_ifunc)) code_range = &node->nd_loc; + prepare_iseq_build(iseq, name, path, realpath, first_lineno, code_range, parent, type, option); rb_iseq_compile_node(iseq, node); finish_iseq_build(iseq); |