ruby-changes:9546
From: ko1 <ko1@a...>
Date: Sat, 27 Dec 2008 13:45:45 +0900 (JST)
Subject: [ruby-changes:9546] Ruby:r21086 (trunk): * eval.c (get_errinfo): return th->errinfo value
ko1 2008-12-27 13:45:28 +0900 (Sat, 27 Dec 2008) New Revision: 21086 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21086 Log: * 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. Modified files: trunk/ChangeLog trunk/bootstraptest/test_proc.rb trunk/eval.c Index: ChangeLog =================================================================== --- ChangeLog (revision 21085) +++ ChangeLog (revision 21086) @@ -1,3 +1,11 @@ +Sat Dec 27 13:36:55 2008 Koichi Sasada <ko1@a...> + + * 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@y...> * man/irb.1: adds -v, -h, -E and -U. Index: bootstraptest/test_proc.rb =================================================================== --- bootstraptest/test_proc.rb (revision 21085) +++ bootstraptest/test_proc.rb (revision 21086) @@ -418,3 +418,11 @@ fp.bar }, 'Subclass of Proc' + +assert_equal 'ok', %q{ + at_exit{ + print $!.message + } + raise "ok" +} + Index: eval.c =================================================================== --- eval.c (revision 21085) +++ eval.c (revision 21086) @@ -961,7 +961,8 @@ return *ptr; } else { - return Qnil; + rb_thread_t *th = GET_THREAD(); + return th->errinfo; } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/