summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--bootstraptest/test_proc.rb8
-rw-r--r--eval.c3
3 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 304e85b772..a38c67993e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Dec 27 13:36:55 2008 Koichi Sasada <ko1@atdot.net>
+
+ * 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.
+
Sat Dec 27 13:10:43 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* man/irb.1: adds -v, -h, -E and -U.
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb
index 9bef6ea85e..820dc1f764 100644
--- a/bootstraptest/test_proc.rb
+++ b/bootstraptest/test_proc.rb
@@ -418,3 +418,11 @@ assert_equal 'foo!', %q{
fp.bar
}, 'Subclass of Proc'
+
+assert_equal 'ok', %q{
+ at_exit{
+ print $!.message
+ }
+ raise "ok"
+}
+
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;
}
}