mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
45880b8e7d
commit
22987dc7fe
2 changed files with 13 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Sep 18 20:50:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/rake.rb (Rake::Application#standard_exception_handling):
|
||||||
|
replaced magic numbers for exit status.
|
||||||
|
|
||||||
Thu Sep 18 20:37:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Sep 18 20:37:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits
|
* lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits
|
||||||
|
|
16
lib/rake.rb
16
lib/rake.rb
|
@ -72,7 +72,7 @@ end # module Module
|
||||||
#
|
#
|
||||||
class String
|
class String
|
||||||
rake_extension("ext") do
|
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
|
# 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.
|
# is not given, or is the empty string, remove any existing extension.
|
||||||
#
|
#
|
||||||
|
@ -145,7 +145,7 @@ class String
|
||||||
# * <b>%x</b> -- The file extension of the path. An empty string if there
|
# * <b>%x</b> -- The file extension of the path. An empty string if there
|
||||||
# is no extension.
|
# is no extension.
|
||||||
# * <b>%X</b> -- Everything *but* the file extension.
|
# * <b>%X</b> -- Everything *but* the file extension.
|
||||||
# * <b>%s</b> -- The alternate file separater if defined, otherwise use
|
# * <b>%s</b> -- The alternate file separator if defined, otherwise use
|
||||||
# the standard file separator.
|
# the standard file separator.
|
||||||
# * <b>%%</b> -- A percent sign.
|
# * <b>%%</b> -- A percent sign.
|
||||||
#
|
#
|
||||||
|
@ -160,8 +160,8 @@ class String
|
||||||
# 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d'
|
# 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d'
|
||||||
#
|
#
|
||||||
# Also the %d, %p, $f, $n, %x, and %X operators can take a
|
# Also the %d, %p, $f, $n, %x, and %X operators can take a
|
||||||
# pattern/replacement argument to perform simple string substititions on a
|
# pattern/replacement argument to perform simple string substitutions on a
|
||||||
# particular part of the path. The pattern and replacement are speparated
|
# particular part of the path. The pattern and replacement are separated
|
||||||
# by a comma and are enclosed by curly braces. The replacement spec comes
|
# by a comma and are enclosed by curly braces. The replacement spec comes
|
||||||
# after the % character but before the operator letter. (e.g.
|
# after the % character but before the operator letter. (e.g.
|
||||||
# "%{old,new}d"). Muliple replacement specs should be separated by
|
# "%{old,new}d"). Muliple replacement specs should be separated by
|
||||||
|
@ -2047,10 +2047,10 @@ module Rake
|
||||||
yield
|
yield
|
||||||
rescue SystemExit => ex
|
rescue SystemExit => ex
|
||||||
# Exit silently with current status
|
# Exit silently with current status
|
||||||
exit(ex.status)
|
raise
|
||||||
rescue SystemExit, OptionParser::InvalidOption => ex
|
rescue OptionParser::InvalidOption => ex
|
||||||
# Exit silently
|
# Exit silently
|
||||||
exit(1)
|
exit(false)
|
||||||
rescue Exception => ex
|
rescue Exception => ex
|
||||||
# Exit with error message
|
# Exit with error message
|
||||||
$stderr.puts "rake aborted!"
|
$stderr.puts "rake aborted!"
|
||||||
|
@ -2061,7 +2061,7 @@ module Rake
|
||||||
$stderr.puts ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
|
$stderr.puts ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
|
||||||
$stderr.puts "(See full trace by running task with --trace)"
|
$stderr.puts "(See full trace by running task with --trace)"
|
||||||
end
|
end
|
||||||
exit(1)
|
exit(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue