diff --git a/ChangeLog b/ChangeLog index 0648bd18a8..5a547d7942 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 16 18:10:57 2003 Nobuyoshi Nakada + + * 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 * eval.c (eval): prepend error position in evaluating string to @@ -35,7 +40,7 @@ Sat Nov 15 22:16:42 2003 GOTOU Yuuzou Sat Nov 15 10:05:40 2003 Tanaka Akira - * 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. (Buffer): maintain size by this class. @@ -47,7 +52,7 @@ Fri Nov 14 13:21:30 2003 Hidetoshi NAGAI * 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] Thu Nov 13 20:53:35 2003 Tanaka Akira @@ -57,7 +62,7 @@ Thu Nov 13 20:53:35 2003 Tanaka Akira Thu Nov 13 19:17:00 2003 Hidetoshi NAGAI - * lib/test/unit/ui/tk/testrunner.rb: use grid and panedwindow + * lib/test/unit/ui/tk/testrunner.rb: use grid and panedwindow (if available) Thu Nov 13 17:56:41 2003 Tanaka Akira diff --git a/eval.c b/eval.c index 4a582ded66..31c1033e7e 100644 --- a/eval.c +++ b/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;