From 8e6faa4f97c2cd73a7b1ea881cc11636c39a05da Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 19 May 2014 10:37:14 +0000 Subject: * test/dbm/test_dbm.rb: Use Etc.uname. * test/gdbm/test_gdbm.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dbm/test_dbm.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/dbm') diff --git a/test/dbm/test_dbm.rb b/test/dbm/test_dbm.rb index 083a5c25ba..5d59c92fcd 100644 --- a/test/dbm/test_dbm.rb +++ b/test/dbm/test_dbm.rb @@ -15,12 +15,8 @@ if defined? DBM require 'rbconfig' case RbConfig::CONFIG['target_os'] when 'cygwin' - require 'Win32API' - uname = Win32API.new('cygwin1', 'uname', 'P', 'I') - utsname = ' ' * 100 - raise 'cannot get system name' if uname.call(utsname) == -1 - - utsname.unpack('A20' * 5)[0] + require 'etc' + Etc.uname[:sysname] else RbConfig::CONFIG['target_os'] end -- cgit v1.2.3