mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
0b373d6bbb
commit
bd4fdb714f
3 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue