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

FileUtils.touch(:nocreate => true, :verbose => true) case.
  The patch was written by Hiroyuki Iwatsuki. [ruby-dev:43401]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-04-14 10:58:10 +00:00
parent fb7f3bf37c
commit 8c5961f6f9
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Thu Apr 14 19:55:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* lib/fileutils.rb (FileUtils#touch): fix corrupted output when
FileUtils.touch(:nocreate => true, :verbose => true) case.
The patch was written by Hiroyuki Iwatsuki. [ruby-dev:43401]
Thu Apr 14 16:01:45 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* io.c (rb_f_syscall): reduce warning: "HAVE___SYSCALL" is not defined.

View File

@ -1036,7 +1036,7 @@ module FileUtils
created = nocreate = options[:nocreate]
t = options[:mtime]
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
return if options[:noop]
list.each do |path|