diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/fileutils.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index f2a61970b4..94af69ad2c 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -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| |