aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-05 00:50:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-05 00:50:46 +0000
commitaa2de9e3e00db4ecffa592cdeb177d13b28d328a (patch)
tree811eab59f97c57bcb260a0dfb6f07697c48565cb /eval.c
parent6c8633ab999b13f59b3756f8a319db813c0784cc (diff)
downloadruby-aa2de9e3e00db4ecffa592cdeb177d13b28d328a.tar.gz
* eval.c (return_jump): fix "can't across thread" error message
when no thread associated. http://www.namikilab.tuat.ac.jp/~sasada/diary/200507.html#d31 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 9811c71d95..7ad94f1e6b 100644
--- a/eval.c
+++ b/eval.c
@@ -4763,7 +4763,7 @@ return_jump(retval)
tt->retval = retval;
JUMP_TAG(TAG_RETURN);
}
- if (tt->tag == PROT_THREAD) {
+ if (tt->tag == PROT_THREAD && tt->prev) {
rb_raise(rb_eThreadError, "return can't jump across threads");
}
tt = tt->prev;