ruby-changes:51225
From: nobu <ko1@a...>
Date: Tue, 15 May 2018 16:47:00 +0900 (JST)
Subject: [ruby-changes:51225] nobu:r63432 (trunk): generic_erb.rb: get rid of fileutils
nobu 2018-05-15 16:46:55 +0900 (Tue, 15 May 2018) New Revision: 63432 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63432 Log: generic_erb.rb: get rid of fileutils * tool/generic_erb.rb: get rid of FileUtils.touch, not to depend on fileutils.rb which will depend on rbconfig.rb which does not exist when creating encdb.h. Modified files: trunk/tool/generic_erb.rb Index: tool/generic_erb.rb =================================================================== --- tool/generic_erb.rb (revision 63431) +++ tool/generic_erb.rb (revision 63432) @@ -5,7 +5,6 @@ https://github.com/ruby/ruby/blob/trunk/tool/generic_erb.rb#L5 require 'erb' require 'optparse' -require 'fileutils' $:.unshift(File.dirname(__FILE__)) require 'vpath' require 'colorize' @@ -55,7 +54,8 @@ if output https://github.com/ruby/ruby/blob/trunk/tool/generic_erb.rb#L54 dir, base = File.split(output) timestamp = File.join(dir, ".time." + base) end - FileUtils.touch(timestamp) + File.open(timestamp, 'a') {} + File.utime(nil, nil, timestamp) end else print result -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/