1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* compile.c (defined_expr): fix SEGV by defined?([1]).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-05-30 13:15:03 +00:00
parent 6a734c810c
commit e0a264a9ef
2 changed files with 6 additions and 10 deletions

View file

@ -1,3 +1,7 @@
Fri May 30 22:14:37 2008 Yusuke Endoh <mame@tsg.ne.jp>
* compile.c (defined_expr): fix SEGV by defined?([1]).
Fri May 30 12:18:43 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (prelude.c): simply depends on PREP. [ruby-dev:34877]

View file

@ -2327,18 +2327,10 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
do {
defined_expr(iseq, ret, vals->nd_head, lfinish, Qfalse);
if (lfinish[1]) {
ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]);
}
else {
LABEL *lcont = NEW_LABEL(nd_line(node));
if (!lfinish[1]) {
lfinish[1] = NEW_LABEL(nd_line(node));
ADD_INSNL(ret, nd_line(node), branchif, lcont);
ADD_LABEL(ret, lfinish[1]);
ADD_INSN(ret, nd_line(node), putnil);
ADD_INSNL(ret, nd_line(node), jump, lfinish[0]);
ADD_LABEL(ret, lcont);
}
ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]);
} while ((vals = vals->nd_next) != NULL);
}
case NODE_STR: