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

* lib/fileutils.rb (FileUtils#touch): Fix corrupted output when

:mtime is specified in addition to :nocreate (and :verbose).
  ref [ruby-dev:43401]




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2011-04-15 06:05:25 +00:00
parent 9d5f651a98
commit 6692ef3c54
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Fri Apr 15 14:58:06 2011 Akinori MUSHA <knu@iDaemons.org>
* lib/fileutils.rb (FileUtils#touch): Fix corrupted output when
mtime is specified in addition to nocreate (and verbose).
ref [ruby-dev:43401]
Thu Apr 14 23:43:43 2011 NAKAMURA Usaku <usa@ruby-lang.org> Thu Apr 14 23:43:43 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* numeric.c (ruby_float_step): wrong loop condition. * numeric.c (ruby_float_step): wrong loop condition.

View file

@ -1036,7 +1036,7 @@ module FileUtils
created = nocreate = options[:nocreate] created = nocreate = options[:nocreate]
t = options[:mtime] t = options[:mtime]
if options[:verbose] if options[:verbose]
fu_output_message "touch #{nocreate ? '-c ' : ''}#{t ? t.strftime(' -t %Y%m%d%H%M.%S') : ''}#{list.join ' '}" fu_output_message "touch #{nocreate ? '-c ' : ''}#{t ? t.strftime('-t %Y%m%d%H%M.%S ') : ''}#{list.join ' '}"
end end
return if options[:noop] return if options[:noop]
list.each do |path| list.each do |path|