[前][次][番号順一覧][スレッド一覧]

ruby-changes:9576

From: yugui <ko1@a...>
Date: Sun, 28 Dec 2008 18:40:50 +0900 (JST)
Subject: [ruby-changes:9576] Ruby:r21116 (ruby_1_9_1): merges r21086 from trunk into ruby_1_9_1.

yugui	2008-12-28 18:40:24 +0900 (Sun, 28 Dec 2008)

  New Revision: 21116

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21116

  Log:
    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.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/bootstraptest/test_proc.rb
    branches/ruby_1_9_1/eval.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21115)
+++ ruby_1_9_1/ChangeLog	(revision 21116)
@@ -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 11:41:45 2008  Koichi Sasada  <ko1@a...>
 
 	* vm_insnhelper.c (vm_call_method, vm_call_cfunc): use original id instead of
Index: ruby_1_9_1/bootstraptest/test_proc.rb
===================================================================
--- ruby_1_9_1/bootstraptest/test_proc.rb	(revision 21115)
+++ ruby_1_9_1/bootstraptest/test_proc.rb	(revision 21116)
@@ -418,3 +418,11 @@
 
   fp.bar
 }, 'Subclass of Proc'
+
+assert_equal 'ok', %q{
+  at_exit{
+    print $!.message
+  }
+  raise "ok"
+}
+
Index: ruby_1_9_1/eval.c
===================================================================
--- ruby_1_9_1/eval.c	(revision 21115)
+++ ruby_1_9_1/eval.c	(revision 21116)
@@ -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/

[前][次][番号順一覧][スレッド一覧]