ruby-changes:24528
From: naruse <ko1@a...>
Date: Mon, 30 Jul 2012 23:05:25 +0900 (JST)
Subject: [ruby-changes:24528] naruse:r36579 (trunk): * lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern
naruse 2012-07-30 23:04:48 +0900 (Mon, 30 Jul 2012) New Revision: 36579 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36579 Log: * lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern like x86_64-netbsd6.99.7. Modified files: trunk/ChangeLog trunk/lib/rubygems/platform.rb trunk/test/rubygems/test_gem_platform.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36578) +++ ChangeLog (revision 36579) @@ -1,3 +1,8 @@ +Mon Jul 30 23:01:47 2012 NARUSE, Yui <naruse@r...> + + * lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern + like x86_64-netbsd6.99.7. + Mon Jul 30 21:00:53 2012 Nobuyoshi Nakada <nobu@r...> * variable.c (find_class_path): no retry when preferred is given. Index: lib/rubygems/platform.rb =================================================================== --- lib/rubygems/platform.rb (revision 36578) +++ lib/rubygems/platform.rb (revision 36579) @@ -81,7 +81,7 @@ os, version = $1, $3 @cpu = 'x86' if @cpu.nil? and os =~ /32$/ [os, version] - when /netbsdelf/ then [ 'netbsdelf', nil ] + when /(netbsd[a-z]*)(\d+)/ then [ $1, $2 ] when /openbsd(\d+\.\d+)/ then [ 'openbsd', $1 ] when /solaris(\d+\.\d+)/ then [ 'solaris', $1 ] # test Index: test/rubygems/test_gem_platform.rb =================================================================== --- test/rubygems/test_gem_platform.rb (revision 36578) +++ test/rubygems/test_gem_platform.rb (revision 36579) @@ -67,7 +67,8 @@ 'x86-mswin32' => ['x86', 'mswin32', nil], 'x86-mswin32_60' => ['x86', 'mswin32', '60'], 'x86-mswin32-60' => ['x86', 'mswin32', '60'], - 'i386-netbsdelf' => ['x86', 'netbsdelf', nil], + 'i386-netbsdelf5.1.' => ['x86', 'netbsdelf', '5'], + 'x86_64-netbsd6.99.7' => ['x86_64', 'netbsd', '6'], 'i386-openbsd4.0' => ['x86', 'openbsd', '4.0'], 'i386-solaris2.10' => ['x86', 'solaris', '2.10'], 'i386-solaris2.8' => ['x86', 'solaris', '2.8'], -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/