summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-03-29 16:25:58 +0100
committerAndre Arko <andre@arko.net>2015-03-29 16:48:41 +0100
commitf9dc9a456b098aa8e16cd6448de9e2a82c6199ea (patch)
treeecdcdcde99c5b88b8b67f55fa9dad74f47876fa7
parent38bab86b04985a1fadb1d3f9dbff4dcee8ae379b (diff)
downloadbundler-f9dc9a456b098aa8e16cd6448de9e2a82c6199ea.tar.gz
build args are global and not thread-safe :’(
fixes #3404
-rw-r--r--lib/bundler/rubygems_integration.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index d32bbb36ff..ef9ac0a2c7 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -161,12 +161,14 @@ module Bundler
end
def with_build_args(args)
- old_args = self.build_args
- begin
- self.build_args = args
- yield
- ensure
- self.build_args = old_args
+ ext_lock.synchronize do
+ old_args = self.build_args
+ begin
+ self.build_args = args
+ yield
+ ensure
+ self.build_args = old_args
+ end
end
end