From 4c54b2a9a012296709de5283eada03470d581dc9 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Tue, 21 Jul 2015 11:47:16 +0930 Subject: Adjust expectations around purpose/compatibility options --- activesupport/lib/active_support/concurrency/share_lock.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/concurrency/share_lock.rb b/activesupport/lib/active_support/concurrency/share_lock.rb index 48edcfdaa5..39ae9bfb79 100644 --- a/activesupport/lib/active_support/concurrency/share_lock.rb +++ b/activesupport/lib/active_support/concurrency/share_lock.rb @@ -132,7 +132,7 @@ module ActiveSupport # Must be called within synchronize def busy?(purpose) (@exclusive_thread && @exclusive_thread != Thread.current) || - (purpose && @waiting.any? { |k, v| k != Thread.current && !v.include?(purpose) }) || + @waiting.any? { |k, v| k != Thread.current && !v.include?(purpose) } || @sharing.size > (@sharing[Thread.current] > 0 ? 1 : 0) end end -- cgit v1.2.3