summaryrefslogtreecommitdiff
path: root/prelude.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-30 06:22:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-30 06:22:30 +0000
commit4b298ad77a8388f0aae62daeca66659a8effeade (patch)
tree163674f4123bf461a86b4f6fd1de964297057bae /prelude.rb
parent0df79477bd2cd534ad2d89bfdbf9708c64b59eed (diff)
Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'prelude.rb')
-rw-r--r--prelude.rb5
1 files changed, 3 insertions, 2 deletions
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
}