1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2014-05-19 10:37:14 +00:00
parent 82dbd0970c
commit 8e6faa4f97
3 changed files with 10 additions and 12 deletions

View file

@ -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> Mon May 19 16:54:22 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/etc/etc.c (etc_uname): add support for Windows using * ext/etc/etc.c (etc_uname): add support for Windows using

View file

@ -15,12 +15,8 @@ if defined? DBM
require 'rbconfig' require 'rbconfig'
case RbConfig::CONFIG['target_os'] case RbConfig::CONFIG['target_os']
when 'cygwin' when 'cygwin'
require 'Win32API' require 'etc'
uname = Win32API.new('cygwin1', 'uname', 'P', 'I') Etc.uname[:sysname]
utsname = ' ' * 100
raise 'cannot get system name' if uname.call(utsname) == -1
utsname.unpack('A20' * 5)[0]
else else
RbConfig::CONFIG['target_os'] RbConfig::CONFIG['target_os']
end end

View file

@ -14,12 +14,8 @@ if defined? GDBM
require 'rbconfig' require 'rbconfig'
case RbConfig::CONFIG['target_os'] case RbConfig::CONFIG['target_os']
when 'cygwin' when 'cygwin'
require 'Win32API' require 'etc'
uname = Win32API.new('cygwin1', 'uname', 'P', 'I') Etc.uname[:sysname]
utsname = ' ' * 100
raise 'cannot get system name' if uname.call(utsname) == -1
utsname.unpack('A20' * 5)[0]
else else
RbConfig::CONFIG['target_os'] RbConfig::CONFIG['target_os']
end end