diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-09 21:38:59 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-09 21:38:59 +0000 |
commit | 31c94ffeb5f09d09ac2c86fc9e6614e38251a43d (patch) | |
tree | 10e44506238c7af3d7c9d822111996731726e38d /lib/rubygems/platform.rb | |
parent | a6afbaeb3be396c0fdea3b9077d9256c59edcfca (diff) | |
download | ruby-31c94ffeb5f09d09ac2c86fc9e6614e38251a43d.tar.gz |
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/platform.rb')
-rw-r--r-- | lib/rubygems/platform.rb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 3e5b5cde66..bfa8fca0ff 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -1,5 +1,3 @@ -require 'rubygems' - ## # Available list of platforms for targeting Gem installations. @@ -105,6 +103,10 @@ class Gem::Platform def to_s to_a.compact.join '-' end + + def empty? + to_s.empty? + end ## # Is +other+ equal to this platform? Two platforms are equal if they have @@ -143,14 +145,14 @@ class Gem::Platform when String then # This data is from http://gems.rubyforge.org/gems/yaml on 19 Aug 2007 other = case other - when /^i686-darwin(\d)/ then ['x86', 'darwin', $1] - when /^i\d86-linux/ then ['x86', 'linux', nil] - when 'java', 'jruby' then [nil, 'java', nil] - when /mswin32(\_(\d+))?/ then ['x86', 'mswin32', $2] - when 'powerpc-darwin' then ['powerpc', 'darwin', nil] - when /powerpc-darwin(\d)/ then ['powerpc', 'darwin', $1] - when /sparc-solaris2.8/ then ['sparc', 'solaris', '2.8'] - when /universal-darwin(\d)/ then ['universal', 'darwin', $1] + when /^i686-darwin(\d)/ then ['x86', 'darwin', $1 ] + when /^i\d86-linux/ then ['x86', 'linux', nil ] + when 'java', 'jruby' then [nil, 'java', nil ] + when /mswin32(\_(\d+))?/ then ['x86', 'mswin32', $2 ] + when 'powerpc-darwin' then ['powerpc', 'darwin', nil ] + when /powerpc-darwin(\d)/ then ['powerpc', 'darwin', $1 ] + when /sparc-solaris2.8/ then ['sparc', 'solaris', '2.8' ] + when /universal-darwin(\d)/ then ['universal', 'darwin', $1 ] else other end |