diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-25 05:10:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-25 05:10:48 +0000 |
commit | 8f1c93f4090be6e57a00c0072a142e8c8cabf393 (patch) | |
tree | 66816d2eda2ae668f819f16e8a4b73d7683acfb2 /compile.c | |
parent | d389625a1ec11b494137a588d7f3f4cf8d4a2c07 (diff) |
compile.c: toplevel return in argument
* compile.c (iseq_compile_each0): adjust the stack before return
in an evstr/argument (reported by Balazs <[email protected]>)
to fix stack consistency error. [ruby-core:81761] [Bug #13678]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -5590,6 +5590,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int popp if (type == ISEQ_TYPE_TOP || type == ISEQ_TYPE_MAIN || ((type == ISEQ_TYPE_RESCUE || type == ISEQ_TYPE_ENSURE) && (parent_type == ISEQ_TYPE_TOP || parent_type == ISEQ_TYPE_MAIN))) { + ADD_ADJUST(ret, line, 0); ADD_INSN(ret, line, putnil); ADD_INSN(ret, line, leave); } |