summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-09 08:56:15 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-09 08:56:15 +0000
commit9ea6f49b4a834977528d7e3b1895ab24b98f6424 (patch)
treeebf495200490f9b8f746cf5bcb3d0a3ccabb9591 /compile.c
parentc3205d65e719dc60deef4136d4556b7ebd803b5f (diff)
* compile.c (iseq_compile_each): the lifetime of new_opt have to be
until this case block is end. this is a part of r57971. [Backport #13766] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 37f369e8b7..4b8ae6f215 100644
--- a/compile.c
+++ b/compile.c
@@ -5993,8 +5993,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_PRELUDE:{
const rb_compile_option_t *orig_opt = ISEQ_COMPILE_DATA(iseq)->option;
+ VALUE orig_cov = ISEQ_COVERAGE(iseq);
+ rb_compile_option_t new_opt = *orig_opt;
if (node->nd_orig) {
- rb_compile_option_t new_opt = *orig_opt;
rb_iseq_make_compile_option(&new_opt, node->nd_orig);
ISEQ_COMPILE_DATA(iseq)->option = &new_opt;
}