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

ruby-changes:37022

From: akr <ko1@a...>
Date: Fri, 2 Jan 2015 18:50:13 +0900 (JST)
Subject: [ruby-changes:37022] akr:r49103 (trunk): * eval.c (ruby_init): Print ruby_setup() error only in debug mode.

akr	2015-01-02 18:49:56 +0900 (Fri, 02 Jan 2015)

  New Revision: 49103

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

  Log:
    * eval.c (ruby_init): Print ruby_setup() error only in debug mode.
      Unsupressable error message is not a good idea.
      Note that the message is printed sometimes with following
      code (highly timing dependent, though):
      pid = spawn("ruby -e ''"); Process.kill(:TERM, pid)

  Modified files:
    trunk/ChangeLog
    trunk/eval.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49102)
+++ ChangeLog	(revision 49103)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jan  2 18:41:20 2015  Tanaka Akira  <akr@f...>
+
+	* eval.c (ruby_init): Print ruby_setup() error only in debug mode.
+	  Unsupressable error message is not a good idea.
+	  Note that the message is printed sometimes with following
+	  code (highly timing dependent, though):
+	  pid = spawn("ruby -e ''"); Process.kill(:TERM, pid)
+
 Fri Jan  2 16:18:44 2015  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* test/ruby/test_module.rb: Refactor invalid testcase.
Index: eval.c
===================================================================
--- eval.c	(revision 49102)
+++ eval.c	(revision 49103)
@@ -73,7 +73,8 @@ ruby_init(void) https://github.com/ruby/ruby/blob/trunk/eval.c#L73
 {
     int state = ruby_setup();
     if (state) {
-	error_print();
+        if (RTEST(ruby_debug))
+            error_print();
 	exit(EXIT_FAILURE);
     }
 }

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

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