summaryrefslogtreecommitdiff
path: root/test/socket
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 08:45:37 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 08:45:37 +0000
commitbd4fdb714ff6cf3d42d5a7e6597e83cbe4de65b8 (patch)
treeb1835a1f7262a48f1af5789bba8511a543b0e8a8 /test/socket
parent0b373d6bbb6cc00c41a5e74a809394aeb9d24994 (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/socket')
-rw-r--r--test/socket/test_socket.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 7380181..c11b909 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -2,6 +2,7 @@ begin
require "socket"
require "tmpdir"
require "fcntl"
+ require "etc"
require "test/unit"
rescue LoadError
end
@@ -332,7 +333,7 @@ class TestSocket < Test::Unit::TestCase
case RUBY_PLATFORM
when /linux/
if ai.ip_address.include?('%') and
- (`uname -r`[/[0-9.]+/].split('.').map(&:to_i) <=> [2,6,18]) <= 0
+ (Etc.uname[:release][/[0-9.]+/].split('.').map(&:to_i) <=> [2,6,18]) <= 0
# Cent OS 5.6 (2.6.18-238.19.1.el5xen) doesn't correctly work
# sendmsg with pktinfo for link-local ipv6 addresses
next true