diff options
author | Andre Arko <andre@arko.net> | 2015-03-29 16:25:58 +0100 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-03-29 16:48:41 +0100 |
commit | f9dc9a456b098aa8e16cd6448de9e2a82c6199ea (patch) | |
tree | ecdcdcde99c5b88b8b67f55fa9dad74f47876fa7 | |
parent | 38bab86b04985a1fadb1d3f9dbff4dcee8ae379b (diff) | |
download | bundler-f9dc9a456b098aa8e16cd6448de9e2a82c6199ea.tar.gz |
build args are global and not thread-safe :’(
fixes #3404
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 14 |
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 |