1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

call to_i

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2014-04-24 01:01:18 +00:00
parent ca258c86cf
commit 8c3b01022b
2 changed files with 4 additions and 4 deletions

View file

@ -1673,14 +1673,14 @@ class TestIO < Test::Unit::TestCase
when 0x9123683E # BTRFS_SUPER_MAGIC when 0x9123683E # BTRFS_SUPER_MAGIC
when 0x7461636f # OCFS2_SUPER_MAGIC when 0x7461636f # OCFS2_SUPER_MAGIC
when 0xEF53 # EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC when 0xEF53 # EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC
return false if (`/bin/uname -r`.split('.') <=> %w[3 8]) < 0 return false if (`/bin/uname -r`.split('.').map(&:to_i) <=> [3,8]) < 0
# ext3's timestamp resolution is seconds # ext3's timestamp resolution is seconds
s = f.stat s = f.stat
s.mtime.nsec != 0 || s.atime.nsec != 0 || s.ctime.nsec != 0 s.mtime.nsec != 0 || s.atime.nsec != 0 || s.ctime.nsec != 0
when 0x58465342 # XFS_SUPER_MAGIC when 0x58465342 # XFS_SUPER_MAGIC
return false if (`/bin/uname -r`.split('.') <=> %w[3 5]) < 0 return false if (`/bin/uname -r`.split('.').map(&:to_i) <=> [3,5]) < 0
when 0x01021994 # TMPFS_MAGIC when 0x01021994 # TMPFS_MAGIC
return false if (`/bin/uname -r`.split('.') <=> %w[3 8]) < 0 return false if (`/bin/uname -r`.split('.').map(&:to_i) <=> [3,8]) < 0
else else
return false return false
end end

View file

@ -9,7 +9,7 @@ class TestSleep < Test::Unit::TestCase
bottom = bottom =
case RUBY_PLATFORM case RUBY_PLATFORM
when /linux/ when /linux/
4.98 if /Linux ([\d.]+)/ =~ `uname -sr` && ($1.split('.')<=>%w/2 6 18/)<1 4.98 if /Linux ([\d.]+)/ =~ `uname -sr` && ($1.split('.').map(&:to_i)<=>[2,6,18])<1
when /mswin|mingw/ when /mswin|mingw/
4.98 4.98
end end