~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rubygems/platform.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require "rubygems/deprecate"
 
2
 
1
3
##
2
4
# Available list of platforms for targeting Gem installations.
3
5
 
70
72
                      when /hpux(\d+)/ then            [ 'hpux',      $1  ]
71
73
                      when /^java$/, /^jruby$/ then    [ 'java',      nil ]
72
74
                      when /^java([\d.]*)/ then        [ 'java',      $1  ]
73
 
                      when /^dotnet$/ then             [ 'dotnet',    nil ]                       
 
75
                      when /^dotnet$/ then             [ 'dotnet',    nil ]
74
76
                      when /^dotnet([\d.]*)/ then      [ 'dotnet',    $1  ]
75
77
                      when /linux/ then                [ 'linux',     $1  ]
76
78
                      when /mingw32/ then              [ 'mingw32',   nil ]
115
117
  # the same CPU, OS and version.
116
118
 
117
119
  def ==(other)
118
 
    self.class === other and
119
 
      @cpu == other.cpu and @os == other.os and @version == other.version
 
120
    self.class === other and to_a == other.to_a
 
121
  end
 
122
 
 
123
  alias :eql? :==
 
124
 
 
125
  def hash # :nodoc:
 
126
    to_a.hash
120
127
  end
121
128
 
122
129
  ##
179
186
 
180
187
  CURRENT = 'current'
181
188
 
 
189
  extend Deprecate
 
190
 
 
191
  deprecate :empty?, :none, 2011, 11
182
192
end
183
193