aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 22:40:06 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 22:40:06 +0000
commit8cc45aae947d453acca029e13eb64f3f5f0bf942 (patch)
treef9485a20c99defe1aae3f32555a41d23c2298ad8 /bin
parentdc8359969ec71ece10357ba9396430db7f029e45 (diff)
downloadruby-8cc45aae947d453acca029e13eb64f3f5f0bf942.tar.gz
Import RubyGems 1.1.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gem13
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/gem b/bin/gem
index aa8db57b51..b5b2b63809 100755
--- a/bin/gem
+++ b/bin/gem
@@ -7,11 +7,12 @@
require 'rubygems'
require 'rubygems/gem_runner'
+require 'rubygems/exceptions'
-required_version = Gem::Requirement.new ">= 1.8.3"
+required_version = Gem::Requirement.new "> 1.8.3"
-unless required_version.satisfied_by? Gem::Version.new(RUBY_VERSION) then
- abort "Expected Ruby Version #{required_version}, was #{RUBY_VERSION}"
+unless required_version.satisfied_by? Gem.ruby_version then
+ abort "Expected Ruby Version #{required_version}, was #{Gem.ruby_version}"
end
# We need to preserve the original ARGV to use for passing gem options
@@ -19,5 +20,9 @@ end
# it...its for the source building process.
args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")]
-Gem::GemRunner.new.run args
+begin
+ Gem::GemRunner.new.run args
+rescue Gem::SystemExitException => e
+ exit e.exit_code
+end