Use warn
with uplevel:
instead of caller
This commit is contained in:
parent
f6a666a1fc
commit
d6e68bb263
@ -8,7 +8,7 @@ class << Thread
|
|||||||
def exclusive(&block) end if false
|
def exclusive(&block) end if false
|
||||||
mutex = Mutex.new # :nodoc:
|
mutex = Mutex.new # :nodoc:
|
||||||
define_method(:exclusive) do |&block|
|
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)
|
mutex.synchronize(&block)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user