From 7e24aacf8bd3f6bc45ba7d42263d70dae33d5b24 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 30 Aug 2016 06:22:30 +0000 Subject: Use qualified names git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- prelude.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'prelude.rb') diff --git a/prelude.rb b/prelude.rb index 80f178d3bd..f9bb7451f8 100644 --- a/prelude.rb +++ b/prelude.rb @@ -1,5 +1,6 @@ class Thread - MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new # :nodoc: + MUTEX_FOR_THREAD_EXCLUSIVE = Thread::Mutex.new # :nodoc: + private_constant :MUTEX_FOR_THREAD_EXCLUSIVE # call-seq: # Thread.exclusive { block } => obj @@ -8,7 +9,7 @@ class Thread # value of the block. A thread executing inside the exclusive section will # only block other threads which also use the Thread.exclusive mechanism. def self.exclusive - warn "Thread.exclusive is deprecated, use Mutex", caller + warn "Thread.exclusive is deprecated, use Thread::Mutex", caller MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{ yield } -- cgit v1.2.3