[前][次][番号順一覧][スレッド一覧]

ruby-changes:58218

From: Kazuhiro <ko1@a...>
Date: Sat, 12 Oct 2019 13:26:44 +0900 (JST)
Subject: [ruby-changes:58218] d6e68bb263 (master): Use `warn` with `uplevel:` instead of `caller`

https://git.ruby-lang.org/ruby.git/commit/?id=d6e68bb263

From d6e68bb263e79cb802fa683d9c4139ddca2fd4f5 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Sat, 12 Oct 2019 13:25:52 +0900
Subject: Use `warn` with `uplevel:` instead of `caller`


diff --git a/prelude.rb b/prelude.rb
index 25f66cd..4e23aba 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -8,7 +8,7 @@ class << Thread https://github.com/ruby/ruby/blob/trunk/prelude.rb#L8
   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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]