From bd4fdb714ff6cf3d42d5a7e6597e83cbe4de65b8 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 18 May 2014 08:45:37 +0000 Subject: 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 --- test/ruby/test_sleep.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_sleep.rb') 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 -- cgit v1.2.3