summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-17 07:47:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-17 07:47:59 +0000
commit874a344ed60bec033fb90d9c9748234df322fafe (patch)
tree7bf5e098f9ab57a8c2301f3d0e6544a820eb64ed
parent0ce51bc995521f1c0c60d6b2409646ea7cde5ce7 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--eval.c7
-rw-r--r--version.h6
3 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cf65410143..caef08930a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Apr 17 16:46:46 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.
+
Mon Apr 16 22:56:01 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/pty/expect_sample.rb: avoid symbolic link representation for
diff --git a/eval.c b/eval.c
index 36af45b6f4..4815717bee 100644
--- a/eval.c
+++ b/eval.c
@@ -5005,8 +5005,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()) {
@@ -8605,6 +8607,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 67e0de60b7..99401cd61f 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2007-04-16"
+#define RUBY_RELEASE_DATE "2007-04-17"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20070416
+#define RUBY_RELEASE_CODE 20070417
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 16
+#define RUBY_RELEASE_DAY 17
RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];