summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2023-12-12 21:32:17 +0100
committerHiroshi SHIBATA <[email protected]>2023-12-14 20:22:48 +0800
commitd718654bb1b6b440b664fe6f35424360b13bab6e (patch)
treeaae0c0a937964b96f21c9e10e3442f044ed3be02 /lib
parent41095f4de058c1a9d571c3c7e745c748d6c07cbc (diff)
[rubygems/rubygems] Remove extension building sync stuff no longer present in RubyGems
https://github.com/rubygems/rubygems/commit/59a85388b9
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/rubygems_integration.rb28
1 files changed, 2 insertions, 26 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index d70d606f57..da555681f9 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -4,17 +4,12 @@ require "rubygems" unless defined?(Gem)
module Bundler
class RubygemsIntegration
- if defined?(Gem::Ext::Builder::CHDIR_MONITOR)
- EXT_LOCK = Gem::Ext::Builder::CHDIR_MONITOR
- else
- require "monitor"
+ require "monitor"
- EXT_LOCK = Monitor.new
- end
+ EXT_LOCK = Monitor.new
def initialize
@replaced_methods = {}
- backport_ext_builder_monitor
end
def version
@@ -479,25 +474,6 @@ module Bundler
end
end
- def backport_ext_builder_monitor
- # So we can avoid requiring "rubygems/ext" in its entirety
- Gem.module_eval <<-RUBY, __FILE__, __LINE__ + 1
- module Ext
- end
- RUBY
-
- require "rubygems/ext/builder"
-
- Gem::Ext::Builder.class_eval do
- unless const_defined?(:CHDIR_MONITOR)
- const_set(:CHDIR_MONITOR, EXT_LOCK)
- end
-
- remove_const(:CHDIR_MUTEX) if const_defined?(:CHDIR_MUTEX)
- const_set(:CHDIR_MUTEX, const_get(:CHDIR_MONITOR))
- end
- end
-
def find_bundler(version)
find_name("bundler").find {|s| s.version.to_s == version }
end