summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEllen Marie Dash <me@duckie.co>2023-09-30 00:30:05 -0400
committergit <svn-admin@ruby-lang.org>2023-10-11 19:07:28 +0000
commit28a6c4a1ad4935e1a0af7904e17733555988b88a (patch)
tree893e2bbc08c2a1fc162bfdabf59a47a8601c5ba1
parentc83f8ad8671afbd8e9ae70c2c4e69a80c6a96d67 (diff)
[rubygems/rubygems] Update incorrect comments.
https://github.com/rubygems/rubygems/commit/6b21f593f3
-rw-r--r--lib/rubygems/installer.rb7
-rw-r--r--spec/bundler/commands/doctor_spec.rb2
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 896f3b4f58..e5df0b4e71 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -196,9 +196,10 @@ class Gem::Installer
end
if @gem_home == Gem.user_dir
- # If we get here, then:
- # 1. `--user-install` was specified, or
- # 2. GEM_HOME was not writable, and `Gem::PathSupport` fell back to `Gem.user_dir`.
+ # If we get here, then one of the following likely happened:
+ # - `--user-install` was specified
+ # - `Gem::PathSupport#home` fell back to `Gem.user_dir`
+ # - GEM_HOME was manually set to `Gem.user_dir`
check_that_user_bin_dir_is_in_path
end
diff --git a/spec/bundler/commands/doctor_spec.rb b/spec/bundler/commands/doctor_spec.rb
index 9eb496b0b2..666b23a141 100644
--- a/spec/bundler/commands/doctor_spec.rb
+++ b/spec/bundler/commands/doctor_spec.rb
@@ -39,7 +39,7 @@ RSpec.describe "bundle doctor" do
allow(File).to receive(:writable?).with(unwritable_file) { true }
allow(File).to receive(:readable?).with(unwritable_file) { true }
- # The following 2 lines are for `Gem::PathSupport#initialize`.
+ # The following lines are for `Gem::PathSupport#initialize`.
allow(File).to receive(:exist?).with(Gem.default_dir)
allow(File).to receive(:writable?).with(Gem.default_dir)
allow(File).to receive(:writable?).with(File.expand_path("..", Gem.default_dir))