summaryrefslogtreecommitdiff
path: root/spec/ruby/core/mutex/unlock_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/mutex/unlock_spec.rb')
-rw-r--r--spec/ruby/core/mutex/unlock_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/mutex/unlock_spec.rb b/spec/ruby/core/mutex/unlock_spec.rb
index 12353f9ba3..ed493cf84a 100644
--- a/spec/ruby/core/mutex/unlock_spec.rb
+++ b/spec/ruby/core/mutex/unlock_spec.rb
@@ -3,7 +3,7 @@ require_relative '../../spec_helper'
describe "Mutex#unlock" do
it "raises ThreadError unless Mutex is locked" do
mutex = Mutex.new
- lambda { mutex.unlock }.should raise_error(ThreadError)
+ -> { mutex.unlock }.should.raise(ThreadError)
end
it "raises ThreadError unless thread owns Mutex" do
@@ -17,9 +17,9 @@ describe "Mutex#unlock" do
# avoid race on mutex.lock
Thread.pass until mutex.locked?
- Thread.pass while th.status and th.status != "sleep"
+ Thread.pass until th.stop?
- lambda { mutex.unlock }.should raise_error(ThreadError)
+ -> { mutex.unlock }.should.raise(ThreadError)
wait.unlock
th.join
@@ -33,6 +33,6 @@ describe "Mutex#unlock" do
th.join
- lambda { mutex.unlock }.should raise_error(ThreadError)
+ -> { mutex.unlock }.should.raise(ThreadError)
end
end