aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2023-08-31 14:44:58 -0500
committergit <svn-admin@ruby-lang.org>2023-09-21 18:30:37 +0000
commit812c8196b69b15713e7bdc9843329d9c490497a8 (patch)
tree49b7f1b3508d7b8924e78380a5793de9b8079530 /lib/rubygems
parente9ed0b3068f54f32d5116ff9d73833d96229fde9 (diff)
downloadruby-812c8196b69b15713e7bdc9843329d9c490497a8.tar.gz
[rubygems/rubygems] Remove usage of Dir.chdir that just execute a subprocess
Preferring instead to spawn the subprocess in the correct directory https://github.com/rubygems/rubygems/commit/ad5abd6a45
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/commands/open_command.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/rubygems/commands/open_command.rb b/lib/rubygems/commands/open_command.rb
index 5a13074a1d..f342fa6c6b 100644
--- a/lib/rubygems/commands/open_command.rb
+++ b/lib/rubygems/commands/open_command.rb
@@ -70,9 +70,7 @@ class Gem::Commands::OpenCommand < Gem::Command
end
def open_editor(path)
- Dir.chdir(path) do
- system(*@editor.split(/\s+/) + [path])
- end
+ system(*@editor.split(/\s+/) + [path], { :chdir => path })
end
def spec_for(name)