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

* 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:
nobu 2003-11-16 09:11:01 +00:00
parent 1fc7d20da2
commit 4e2fd6be8d
2 changed files with 16 additions and 4 deletions

View file

@ -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> Sun Nov 16 13:26:07 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (eval): prepend error position in evaluating string to * eval.c (eval): prepend error position in evaluating string to
@ -35,7 +40,7 @@ Sat Nov 15 22:16:42 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
Sat Nov 15 10:05:40 2003 Tanaka Akira <akr@m17n.org> Sat Nov 15 10:05:40 2003 Tanaka Akira <akr@m17n.org>
* lib/open-uri.rb (OpenURI.open_loop, OpenURI::HTTP#proxy_open): * lib/open-uri.rb (OpenURI.open_loop, OpenURI::HTTP#proxy_open):
refactored to support options. refactored to support options.
(Buffer): maintain size by this class. (Buffer): maintain size by this class.
@ -47,7 +52,7 @@ Fri Nov 14 13:21:30 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib/tcltklib.c: fix (en-bugged at 2003/11/07) * ext/tcltklib/tcltklib.c: fix (en-bugged at 2003/11/07)
* ext/tk/lib/tkdialog.rb: TkDialog.new accepts a parent widget * ext/tk/lib/tkdialog.rb: TkDialog.new accepts a parent widget
argument [ruby-talk:85066] argument [ruby-talk:85066]
Thu Nov 13 20:53:35 2003 Tanaka Akira <akr@m17n.org> Thu Nov 13 20:53:35 2003 Tanaka Akira <akr@m17n.org>
@ -57,7 +62,7 @@ Thu Nov 13 20:53:35 2003 Tanaka Akira <akr@m17n.org>
Thu Nov 13 19:17:00 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> Thu Nov 13 19:17:00 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* lib/test/unit/ui/tk/testrunner.rb: use grid and panedwindow * lib/test/unit/ui/tk/testrunner.rb: use grid and panedwindow
(if available) (if available)
Thu Nov 13 17:56:41 2003 Tanaka Akira <akr@m17n.org> Thu Nov 13 17:56:41 2003 Tanaka Akira <akr@m17n.org>

9
eval.c
View file

@ -2862,6 +2862,7 @@ rb_eval(self, n)
} }
else if (state != TAG_RAISE) { else if (state != TAG_RAISE) {
ruby_errinfo = e_info; ruby_errinfo = e_info;
result = prot_tag->retval;
} }
} }
else if (state == TAG_RAISE) { else if (state == TAG_RAISE) {
@ -2880,8 +2881,14 @@ rb_eval(self, n)
resq = resq->nd_head; /* next rescue */ resq = resq->nd_head; /* next rescue */
} }
} }
else {
result = prot_tag->retval;
}
POP_TAG(); POP_TAG();
if (state) JUMP_TAG(state); if (state) {
if (state == TAG_NEXT) prot_tag->retval = result;
JUMP_TAG(state);
}
/* no exception raised */ /* no exception raised */
if (!rescuing && (node = node->nd_else)) { /* else clause given */ if (!rescuing && (node = node->nd_else)) { /* else clause given */
goto again; goto again;