1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

*** empty log message ***

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-01-25 21:42:42 +00:00
parent 78f457a5d5
commit 1f267f1ee5
2 changed files with 23 additions and 19 deletions

View file

@ -46,11 +46,17 @@ end
parse_args() parse_args()
include FileUtils::Verbose include FileUtils
include FileUtils::NoWrite if $dryrun include FileUtils::NoWrite if $dryrun
@fileutils_output = STDOUT @fileutils_output = STDOUT
@fileutils_label = '' @fileutils_label = ''
alias makelink ln_sf alias makelink ln_sf
class << self
body = proc {|*args|super(*args<<:verbose)}
for func in [:install, :makedirs, :makelink]
define_method(func, body)
end
end
exeext = CONFIG["EXEEXT"] exeext = CONFIG["EXEEXT"]

View file

@ -776,17 +776,16 @@ module FileUtils
@fileutils_label = 'fileutils.' @fileutils_label = 'fileutils.'
@fileutils_verbose = true @fileutils_verbose = true
body = proc do |*args|
unless defined? @fileutils_verbose
@fileutils_verbose = true
end
args.push :verbose if @fileutils_verbose
super(*args)
end
FileUtils::OPT_TABLE.each do |name, opts| FileUtils::OPT_TABLE.each do |name, opts|
next unless opts.include? 'verbose' next unless opts.include? 'verbose'
module_eval(<<-End, __FILE__, __LINE__ + 1) define_method(name, body)
def #{name}( *args )
unless defined? @fileutils_verbose
@fileutils_verbose = true
end
args.push :verbose if @fileutils_verbose
super(*args)
end
End
end end
extend self extend self
@ -807,17 +806,16 @@ module FileUtils
@fileutils_label = 'fileutils.' @fileutils_label = 'fileutils.'
@fileutils_nowrite = true @fileutils_nowrite = true
body = proc do |*args|
unless defined? @fileutils_nowrite
@fileutils_nowrite = true
end
args.push :noop if @fileutils_nowrite
super(*args)
end
FileUtils::OPT_TABLE.each do |name, opts| FileUtils::OPT_TABLE.each do |name, opts|
next unless opts.include? 'noop' next unless opts.include? 'noop'
module_eval(<<-End, __FILE__, __LINE__ + 1) define_method(name, body)
def #{name}( *args )
unless defined? @fileutils_nowrite
@fileutils_nowrite = true
end
args.push :noop if @fileutils_nowrite
super(*args)
end
End
end end
extend self extend self