diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | compile.c | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Thu Dec 20 09:40:51 2007 Koichi Sasada <ko1@atdot.net> + + * compile.c (iseq_compile_each/NODE_RETURN): fix stack consistency. + Thu Dec 20 09:42:11 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * bignum.c (big2str_orig): access beyond memory region cause crash @@ -3804,12 +3804,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) } else { ADD_INSN1(ret, nd_line(node), throw, INT2FIX(0x01) /* TAG_RETURN */ ); - ADD_INSN(ret, nd_line(node), pop); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } } break; } } - break; } case NODE_YIELD:{ |