diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/dbm/test_dbm.rb | 8 | ||||
-rw-r--r-- | test/gdbm/test_gdbm.rb | 8 |
3 files changed, 10 insertions, 12 deletions
@@ -1,3 +1,9 @@ +Mon May 19 19:36:39 2014 Tanaka Akira <akr@fsij.org> + + * test/dbm/test_dbm.rb: Use Etc.uname. + + * test/gdbm/test_gdbm.rb: Ditto. + Mon May 19 16:54:22 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/etc/etc.c (etc_uname): add support for Windows using 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 diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb index b406d59dc2..ae6985a5b4 100644 --- a/test/gdbm/test_gdbm.rb +++ b/test/gdbm/test_gdbm.rb @@ -14,12 +14,8 @@ if defined? GDBM 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 |