1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use warn with uplevel: instead of caller

This commit is contained in:
Kazuhiro NISHIYAMA 2019-10-12 13:25:52 +09:00
parent f6a666a1fc
commit d6e68bb263
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -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