Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnufied/353770 to your computer and use it in GitHub Desktop.
Save gnufied/353770 to your computer and use it in GitHub Desktop.
From 865176c6fe90aa5262317a24fd7df15cc7685018 Mon Sep 17 00:00:00 2001
From: Hemant Kumar <gethemant@gmail.com>
Date: Sat, 3 Apr 2010 03:09:03 +0530
Subject: [PATCH] fix the exit status code of exit!
---
kernel/common/kernel.rb | 2 +-
kernel/common/process.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/common/kernel.rb b/kernel/common/kernel.rb
index bf88bb8..d4d7d3b 100644
--- a/kernel/common/kernel.rb
+++ b/kernel/common/kernel.rb
@@ -160,7 +160,7 @@ module Kernel
end
module_function :exit
- def exit!(code=0)
+ def exit!(code=1)
Process.exit(code)
end
module_function :exit!
diff --git a/kernel/common/process.rb b/kernel/common/process.rb
index c576f06..4feefbd 100644
--- a/kernel/common/process.rb
+++ b/kernel/common/process.rb
@@ -102,7 +102,7 @@ module Process
$stderr.puts(msg) if(msg)
exit 1
end
- def self.exit!(code=0)
+ def self.exit!(code=1)
exit(code)
end
--
1.6.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment