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

ruby-changes:13538

From: marcandre <ko1@a...>
Date: Tue, 13 Oct 2009 08:53:55 +0900 (JST)
Subject: [ruby-changes:13538] Ruby:r25316 (trunk): * thread.c: Revert changes to Thread#raise made in r25278

marcandre	2009-10-13 08:53:48 +0900 (Tue, 13 Oct 2009)

  New Revision: 25316

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

  Log:
    * thread.c: Revert changes to Thread#raise made in r25278 [ruby-core:25367]
    
    * eval_intern.h: ditto

  Modified files:
    trunk/eval.c
    trunk/eval_intern.h
    trunk/thread.c

Index: eval_intern.h
===================================================================
--- eval_intern.h	(revision 25315)
+++ eval_intern.h	(revision 25316)
@@ -212,7 +212,6 @@
 VALUE rb_vm_top_self();
 VALUE rb_vm_cbase(void);
 void rb_trap_restore_mask(void);
-VALUE rb_threadptr_errinfo(rb_thread_t *);
 
 #ifndef CharNext		/* defined as CharNext[AW] on Windows. */
 #define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
Index: thread.c
===================================================================
--- thread.c	(revision 25315)
+++ thread.c	(revision 25316)
@@ -76,7 +76,6 @@
 
 static const VALUE eKillSignal = INT2FIX(0);
 static const VALUE eTerminateSignal = INT2FIX(1);
-static const VALUE eReRaiseSignal = INT2FIX(2);
 static volatile int system_working = 1;
 
 inline static void
@@ -1247,10 +1246,6 @@
 		TH_JUMP_TAG(th, TAG_FATAL);
 	    }
 	    else {
-		if (err == eReRaiseSignal) {
-		    err = rb_threadptr_errinfo(th);
-		    err = rb_make_exception(NIL_P(err) ? 0 : 1, &err);
-		}
 		rb_exc_raise(err);
 	    }
 	}
@@ -1317,12 +1312,7 @@
 	goto again;
     }
 
-    if (argc == 0) {
-	exc = eReRaiseSignal;
-    }
-    else {
-	exc = rb_make_exception(argc, argv);
-    }
+    exc = rb_make_exception(argc, argv);
     th->thrown_errinfo = exc;
     rb_threadptr_ready(th);
     return Qnil;
Index: eval.c
===================================================================
--- eval.c	(revision 25315)
+++ eval.c	(revision 25316)
@@ -1004,7 +1004,7 @@
     return get_errinfo();
 }
 
-VALUE
+static VALUE
 rb_threadptr_errinfo(rb_thread_t *th)
 {
     return get_thread_errinfo(th);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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