diff --git a/prelude.rb b/prelude.rb index 25f66cdf13..4e23aba36e 100644 --- a/prelude.rb +++ b/prelude.rb @@ -8,7 +8,7 @@ class << Thread def exclusive(&block) end if false mutex = Mutex.new # :nodoc: define_method(:exclusive) do |&block| - warn "Thread.exclusive is deprecated, use Thread::Mutex", caller + warn "Thread.exclusive is deprecated, use Thread::Mutex", uplevel: 1 mutex.synchronize(&block) end end