ruby-changes:44512
From: naruse <ko1@a...>
Date: Sat, 5 Nov 2016 17:59:49 +0900 (JST)
Subject: [ruby-changes:44512] naruse:r56585 (trunk): Refix r56559 with Fs.noatime? [Bug #12903]
naruse 2016-11-05 17:59:43 +0900 (Sat, 05 Nov 2016) New Revision: 56585 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56585 Log: Refix r56559 with Fs.noatime? [ruby-core:77943] [Bug #12903] Modified files: trunk/test/ruby/test_file.rb Index: test/ruby/test_file.rb =================================================================== --- test/ruby/test_file.rb (revision 56584) +++ test/ruby/test_file.rb (revision 56585) @@ -2,6 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file.rb#L2 require 'test/unit' require 'tempfile' require "thread" +require "-test-/file" require_relative 'ut_eof' class TestFile < Test::Unit::TestCase @@ -359,7 +360,6 @@ class TestFile < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file.rb#L360 File.write(path, "bar") sleep 2 File.read(path) - a0 = File.stat(path).atime File.chmod(0644, path) sleep 2 File.read(path) @@ -371,7 +371,7 @@ class TestFile < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file.rb#L371 if stat.birthtime != stat.ctime assert_in_delta t0+4, stat.ctime.to_f, delta end - if a0 > stat.mtime + if /mswin|mingw/ !~ RUBY_PLATFORM && !Bug::File::Fs.noatime?(path) # Windows delays updating atime assert_in_delta t0+6, stat.atime.to_f, delta end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/