summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-02 09:49:56 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-02 09:49:56 +0000
commitd4959439abf1aec694ca5ad836e451892919af4a (patch)
tree8b8f2cf13a69a7d81b2e636e5af4a9e6f3d4b252 /eval.c
parentc7d6c0d084bbb40d43d7bf7e0e4812c09d1a1a90 (diff)
* 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) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index dc5af43..3fef29a 100644
--- a/eval.c
+++ b/eval.c
@@ -73,7 +73,8 @@ ruby_init(void)
{
int state = ruby_setup();
if (state) {
- error_print();
+ if (RTEST(ruby_debug))
+ error_print();
exit(EXIT_FAILURE);
}
}