From 22987dc7fe5830d8423f8153bef0310339e178f4 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 18 Sep 2008 11:51:00 +0000 Subject: * lib/rake.rb (Rake::Application#standard_exception_handling): replaced magic numbers for exit status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rake.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/rake.rb') diff --git a/lib/rake.rb b/lib/rake.rb index da2abdf8da..caafa5caf0 100755 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -72,7 +72,7 @@ end # module Module # class String rake_extension("ext") do - # Replace the file extension with +newext+. If there is no extenson on + # Replace the file extension with +newext+. If there is no extension on # the string, append the new extension to the end. If the new extension # is not given, or is the empty string, remove any existing extension. # @@ -145,7 +145,7 @@ class String # * %x -- The file extension of the path. An empty string if there # is no extension. # * %X -- Everything *but* the file extension. - # * %s -- The alternate file separater if defined, otherwise use + # * %s -- The alternate file separator if defined, otherwise use # the standard file separator. # * %% -- A percent sign. # @@ -160,8 +160,8 @@ class String # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d' # # Also the %d, %p, $f, $n, %x, and %X operators can take a - # pattern/replacement argument to perform simple string substititions on a - # particular part of the path. The pattern and replacement are speparated + # pattern/replacement argument to perform simple string substitutions on a + # particular part of the path. The pattern and replacement are separated # by a comma and are enclosed by curly braces. The replacement spec comes # after the % character but before the operator letter. (e.g. # "%{old,new}d"). Muliple replacement specs should be separated by @@ -2047,10 +2047,10 @@ module Rake yield rescue SystemExit => ex # Exit silently with current status - exit(ex.status) - rescue SystemExit, OptionParser::InvalidOption => ex + raise + rescue OptionParser::InvalidOption => ex # Exit silently - exit(1) + exit(false) rescue Exception => ex # Exit with error message $stderr.puts "rake aborted!" @@ -2061,7 +2061,7 @@ module Rake $stderr.puts ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || "" $stderr.puts "(See full trace by running task with --trace)" end - exit(1) + exit(false) end end -- cgit v1.2.3