summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--eval.c7
-rw-r--r--version.h2
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ba518c33e3..9c58dd6c15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed May 23 02:09:32 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (rb_yield_0): should not clear state on TAG_NEXT when
+ it's invoked from within lambda body. [ruby-talk:248136]
+
+ * eval.c (proc_invoke): handle TAG_NEXT which would be caused by
+ next in the lambda body as well.
+
Wed May 23 01:55:49 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_fclose, rb_w32_close): need to save errno
diff --git a/eval.c b/eval.c
index 991792c875..0ea279caee 100644
--- a/eval.c
+++ b/eval.c
@@ -4994,8 +4994,10 @@ rb_yield_0(val, self, klass, flags, avalue)
CHECK_INTS;
goto redo;
case TAG_NEXT:
- state = 0;
- result = prot_tag->retval;
+ if (!lambda) {
+ state = 0;
+ result = prot_tag->retval;
+ }
break;
case TAG_BREAK:
if (TAG_DST()) {
@@ -8531,6 +8533,7 @@ proc_invoke(proc, args, self, klass)
proc_jump_error(TAG_RETRY, Qnil); /* xxx */
JUMP_TAG(state);
break;
+ case TAG_NEXT:
case TAG_BREAK:
if (!pcall && result != Qundef) {
proc_jump_error(state, result);
diff --git a/version.h b/version.h
index 6c581ec1a6..e4096cbd87 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-05-23"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070523
-#define RUBY_PATCHLEVEL 43
+#define RUBY_PATCHLEVEL 44
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8