From 91c7b2667e347b82268473e8f1a97f85823e70d3 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 20 Dec 2007 00:46:12 +0000 Subject: * compile.c (iseq_compile_each/NODE_RETURN): fix stack consistency. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ compile.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6c63f6e3..b783f8fc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 20 09:40:51 2007 Koichi Sasada + + * compile.c (iseq_compile_each/NODE_RETURN): fix stack consistency. + Thu Dec 20 09:42:11 2007 Yukihiro Matsumoto * bignum.c (big2str_orig): access beyond memory region cause crash diff --git a/compile.c b/compile.c index bbb43003a..10cd85f2b 100644 --- a/compile.c +++ b/compile.c @@ -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:{ -- cgit