summaryrefslogtreecommitdiff
path: root/lib/rubygems/platform.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 +0000
commit8289771e326006cc4e15a667e3eff3a72cfb3327 (patch)
treef6d367888b42848fd6a660fad57fa2020e38c097 /lib/rubygems/platform.rb
parent40d8543fbdec5485a638a2cb1008089d106b978d (diff)
Import RubyGems 1.0.0, r1575
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/platform.rb')
-rw-r--r--lib/rubygems/platform.rb45
1 files changed, 17 insertions, 28 deletions
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb
index 496c4b1fb8..7abc15ef94 100644
--- a/lib/rubygems/platform.rb
+++ b/lib/rubygems/platform.rb
@@ -12,6 +12,23 @@ class Gem::Platform
attr_accessor :version
+ DEPRECATED_CONSTS = [
+ :DARWIN,
+ :LINUX_586,
+ :MSWIN32,
+ :PPC_DARWIN,
+ :WIN32,
+ :X86_LINUX
+ ]
+
+ def self.const_missing(name) # TODO remove six months from 2007/12
+ if DEPRECATED_CONSTS.include? name then
+ raise NameError, "#{name} has been removed, use CURRENT instead"
+ else
+ super
+ end
+ end
+
def self.local
arch = Gem::ConfigMap[:arch]
arch = "#{arch}_60" if arch =~ /mswin32$/
@@ -160,33 +177,5 @@ class Gem::Platform
CURRENT = 'current'
- ##
- # A One Click Installer-compatible gem, built with VC6 for 32 bit Windows.
- #
- # CURRENT is preferred over this constant, avoid its use at all costs.
-
- MSWIN32 = new ['x86', 'mswin32', '60']
-
- ##
- # An x86 Linux-compatible gem
- #
- # CURRENT is preferred over this constant, avoid its use at all costs.
-
- X86_LINUX = new ['x86', 'linux', nil]
-
- ##
- # A PowerPC Darwin-compatible gem
- #
- # CURRENT is preferred over this constant, avoid its use at all costs.
-
- PPC_DARWIN = new ['ppc', 'darwin', nil]
-
- # :stopdoc:
- # Here lie legacy constants. These are deprecated.
- WIN32 = 'mswin32'
- LINUX_586 = 'i586-linux'
- DARWIN = 'powerpc-darwin'
- # :startdoc:
-
end