summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-28 09:40:24 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-28 09:40:24 +0000
commit02e2b50599415deafaf2fc148b628d42ce4c79b8 (patch)
tree19f0c7295cc3ec5720350466a30c1680bf1cb31c /eval.c
parent6bcc55dc6c5396547d4c1ab7022e6a000a1ecfda (diff)
merges r21086 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21116 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;
}
}