summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@idaemons.org>2020-10-22 03:46:18 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-22 12:06:05 +0900
commit388c4e1076ac5a58d5008abc8e0a8d017698875a (patch)
treedfad9309a4bef159462037b65e7f55c301197520 /bin
parent6b749968103e2e91f4d8d2957900ac9ac06cf2ee (diff)
Make Gem::SystemExitException properly exit with a given code
The cause was in how Gem::SystemExitException initializes itself. It didn't pass an exit code to the super method. See the document of SystemExit.new() for details.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6167
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gem7
1 files changed, 1 insertions, 6 deletions
diff --git a/bin/gem b/bin/gem
index baf607308b..133774ff11 100755
--- a/bin/gem
+++ b/bin/gem
@@ -7,12 +7,7 @@
require 'rubygems'
require 'rubygems/gem_runner'
-require 'rubygems/exceptions'
args = ARGV.clone
-begin
- Gem::GemRunner.new.run args
-rescue Gem::SystemExitException => e
- exit e.exit_code
-end
+Gem::GemRunner.new.run args