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:
		
							parent
							
								
									82dbd0970c
								
							
						
					
					
						commit
						8e6faa4f97
					
				
					 3 changed files with 10 additions and 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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue