From 6692ef3c54a6c2aaa01e122925f9fcc441bb3132 Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 15 Apr 2011 06:05:25 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ lib/fileutils.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index da4d4250b2..f6d8907b17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Apr 15 14:58:06 2011 Akinori MUSHA + + * 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 * numeric.c (ruby_float_step): wrong loop condition. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 94af69ad2c..dc956a67ab 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|