summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-27 04:45:28 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-27 04:45:28 +0000
commitbd96f1fe705c973af8c6e1aec92802ba692b9b52 (patch)
treeecc3b3c539440a8473a90ac73beb04c8f9ac7d65 /eval.c
parente434135ecbc8e00c9e036fb14df399224a478925 (diff)
* eval.c (get_errinfo): return th->errinfo value
if normal errinfo place (dynamic local viriable) is not found. fixes Bug #732 [ruby-dev:37046]. * bootstraptest/test_proc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 2dd75afa87..74489d3a65 100644
--- a/eval.c
+++ b/eval.c
@@ -961,7 +961,8 @@ get_errinfo(void)
return *ptr;
}
else {
- return Qnil;
+ rb_thread_t *th = GET_THREAD();
+ return th->errinfo;
}
}