ruby-changes:33934
From: akr <ko1@a...>
Date: Mon, 19 May 2014 19:37:27 +0900 (JST)
Subject: [ruby-changes:33934] akr:r46015 (trunk): * test/dbm/test_dbm.rb: Use Etc.uname.
akr 2014-05-19 19:37:14 +0900 (Mon, 19 May 2014) New Revision: 46015 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46015 Log: * test/dbm/test_dbm.rb: Use Etc.uname. * test/gdbm/test_gdbm.rb: Ditto. Modified files: trunk/ChangeLog trunk/test/dbm/test_dbm.rb trunk/test/gdbm/test_gdbm.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46014) +++ ChangeLog (revision 46015) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon May 19 19:36:39 2014 Tanaka Akira <akr@f...> + + * test/dbm/test_dbm.rb: Use Etc.uname. + + * test/gdbm/test_gdbm.rb: Ditto. + Mon May 19 16:54:22 2014 Nobuyoshi Nakada <nobu@r...> * ext/etc/etc.c (etc_uname): add support for Windows using Index: test/dbm/test_dbm.rb =================================================================== --- test/dbm/test_dbm.rb (revision 46014) +++ test/dbm/test_dbm.rb (revision 46015) @@ -15,12 +15,8 @@ if defined? DBM https://github.com/ruby/ruby/blob/trunk/test/dbm/test_dbm.rb#L15 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 Index: test/gdbm/test_gdbm.rb =================================================================== --- test/gdbm/test_gdbm.rb (revision 46014) +++ test/gdbm/test_gdbm.rb (revision 46015) @@ -14,12 +14,8 @@ if defined? GDBM https://github.com/ruby/ruby/blob/trunk/test/gdbm/test_gdbm.rb#L14 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/