pantry/projects/rubygems.org/fit-n-finish.2.patch
Jacob Heider e151a37e98 fix(rubygems)
patches don't age well.

closes #4440
closes #4450
2023-12-15 20:07:27 -05:00

28 lines
922 B
Diff

diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 29552d9..814c4f4 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -299,7 +299,7 @@ module Gem
def self.bindir(install_dir=Gem.dir)
return File.join install_dir, "bin" unless
- install_dir.to_s == Gem.default_dir.to_s
+ install_dir.to_s == Gem.default_system_dir.to_s
Gem.default_bindir
end
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 8e0182f..aa53e4c 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -31,6 +31,10 @@ module Gem
@default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"])
end
+ def self.default_system_dir
+ File.join("/usr/local/lib/ruby/gems", RbConfig::CONFIG["ruby_version"])
+ end
+
##
# Returns binary extensions dir for specified RubyGems base dir or nil
# if such directory cannot be determined.