diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-18 08:45:37 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-18 08:45:37 +0000 |
commit | bd4fdb714ff6cf3d42d5a7e6597e83cbe4de65b8 (patch) | |
tree | b1835a1f7262a48f1af5789bba8511a543b0e8a8 /test/ruby/test_sleep.rb | |
parent | 0b373d6bbb6cc00c41a5e74a809394aeb9d24994 (diff) |
Use Etc.uname instead of uname command invocation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_sleep.rb')
-rw-r--r-- | test/ruby/test_sleep.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_sleep.rb b/test/ruby/test_sleep.rb index 82c7e0ff49..a2e50739fb 100644 --- a/test/ruby/test_sleep.rb +++ b/test/ruby/test_sleep.rb @@ -1,4 +1,5 @@ require 'test/unit' +require 'etc' class TestSleep < Test::Unit::TestCase def test_sleep_5sec @@ -9,7 +10,7 @@ class TestSleep < Test::Unit::TestCase bottom = case RUBY_PLATFORM when /linux/ - 4.98 if /Linux ([\d.]+)/ =~ `uname -sr` && ($1.split('.').map(&:to_i)<=>[2,6,18])<1 + 4.98 if (Etc.uname[:release].split('.').map(&:to_i)<=>[2,6,18]) <= 0 when /mswin|mingw/ 4.98 end |