From 8c5961f6f9b0387647e233be8652f23e609d68c2 Mon Sep 17 00:00:00 2001 From: kosaki Date: Thu, 14 Apr 2011 10:58:10 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ lib/fileutils.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cdc11e4739..a2a2b8b149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Apr 14 19:55:54 2011 KOSAKI Motohiro + + * 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 * 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|