summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-12-14 21:14:58 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-12-15 18:05:18 +0900
commit7e084ed707310139b351f6d30af435676422af62 (patch)
treedb7450ae96ccd8d90287e33412769230da247242 /lib/rubygems/commands
parent583e06e28f5ed4078393000f929f4380777ba972 (diff)
Merge RubyGems and Bundler master
Merge from https://github.com/rubygems/rubygems/commit/793ad95ecb40e84a1dcb4cb60f2686843ed90de5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5265
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/setup_command.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index ed1fcaa4b8..0601dccb07 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -12,8 +12,6 @@ class Gem::Commands::SetupCommand < Gem::Command
ENV_PATHS = %w[/usr/bin/env /bin/env].freeze
def initialize
- require 'tmpdir'
-
super 'setup', 'Install RubyGems',
:format_executable => false, :document => %w[ri],
:force => true,
@@ -253,6 +251,8 @@ By default, this RubyGems will install gem as:
Dir.chdir path do
bin_file = "gem"
+ require 'tmpdir'
+
dest_file = target_bin_path(bin_dir, bin_file)
bin_tmp_file = File.join Dir.tmpdir, "#{bin_file}.#{$$}"