* eval.c (rb_eval): iterator should return value from next inside
begin/rescue/end. (ruby-bugs:PR#1218) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1fc7d20da2
commit
4e2fd6be8d
@ -1,3 +1,8 @@
|
||||
Sun Nov 16 18:10:57 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_eval): iterator should return value from next inside
|
||||
begin/rescue/end. (ruby-bugs:PR#1218)
|
||||
|
||||
Sun Nov 16 13:26:07 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (eval): prepend error position in evaluating string to
|
||||
|
9
eval.c
9
eval.c
@ -2862,6 +2862,7 @@ rb_eval(self, n)
|
||||
}
|
||||
else if (state != TAG_RAISE) {
|
||||
ruby_errinfo = e_info;
|
||||
result = prot_tag->retval;
|
||||
}
|
||||
}
|
||||
else if (state == TAG_RAISE) {
|
||||
@ -2880,8 +2881,14 @@ rb_eval(self, n)
|
||||
resq = resq->nd_head; /* next rescue */
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = prot_tag->retval;
|
||||
}
|
||||
POP_TAG();
|
||||
if (state) JUMP_TAG(state);
|
||||
if (state) {
|
||||
if (state == TAG_NEXT) prot_tag->retval = result;
|
||||
JUMP_TAG(state);
|
||||
}
|
||||
/* no exception raised */
|
||||
if (!rescuing && (node = node->nd_else)) { /* else clause given */
|
||||
goto again;
|
||||
|
Loading…
x
Reference in New Issue
Block a user