Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1148 from terceiro/systemexit

Add missing method SystemExit#success?
  • Loading branch information...
commit d92b1017b722619ee9ead516e24bfa6a07d3bd76 2 parents d324cb6 + e973c3d
@evanphx evanphx authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 kernel/common/exception.rb
View
9 kernel/common/exception.rb
@@ -311,6 +311,15 @@ def initialize(first=nil, *args)
@status = status
end
+ ##
+ # Returns true is exiting successfully, false if not. A successful exit is
+ # one with a status equal to 0 (zero). Any other status is considered a
+ # unsuccessful exit.
+
+ def success?
+ status == Process::EXIT_SUCCESS
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.