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

Fix style in Thread#raise spec

* Add space after { and before }.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-04-25 08:15:58 +00:00
parent 66058dd546
commit 9498d66c5d

View file

@ -6,8 +6,8 @@ describe "Thread#raise" do
it "ignores dead threads" do it "ignores dead threads" do
t = Thread.new { :dead } t = Thread.new { :dead }
Thread.pass while t.alive? Thread.pass while t.alive?
lambda {t.raise("Kill the thread")}.should_not raise_error -> { t.raise("Kill the thread") }.should_not raise_error
lambda {t.value}.should_not raise_error -> { t.value }.should_not raise_error
end end
end end
@ -58,7 +58,7 @@ describe "Thread#raise on a sleeping thread" do
ThreadSpecs.spin_until_sleeping(t) ThreadSpecs.spin_until_sleeping(t)
t.raise t.raise
lambda { t.value }.should raise_error(RuntimeError) -> { t.value }.should raise_error(RuntimeError)
end end
it "raises a RuntimeError when called with no arguments inside rescue" do it "raises a RuntimeError when called with no arguments inside rescue" do
@ -76,7 +76,7 @@ describe "Thread#raise on a sleeping thread" do
ThreadSpecs.spin_until_sleeping(t) ThreadSpecs.spin_until_sleeping(t)
t.raise t.raise
end end
lambda {t.value}.should raise_error(RuntimeError) -> { t.value }.should raise_error(RuntimeError)
end end
end end
@ -120,7 +120,7 @@ describe "Thread#raise on a running thread" do
end end
t.raise t.raise
lambda {t.value}.should raise_error(RuntimeError) -> { t.value }.should raise_error(RuntimeError)
end end
it "raises the given argument even when there is an active exception" do it "raises the given argument even when there is an active exception" do
@ -139,7 +139,7 @@ describe "Thread#raise on a running thread" do
rescue rescue
Thread.pass until raised Thread.pass until raised
t.raise RangeError t.raise RangeError
lambda {t.value}.should raise_error(RangeError) -> { t.value }.should raise_error(RangeError)
end end
end end
@ -160,7 +160,7 @@ describe "Thread#raise on a running thread" do
Thread.pass until raised Thread.pass until raised
t.raise t.raise
end end
lambda {t.value}.should raise_error(RuntimeError) -> { t.value }.should raise_error(RuntimeError)
end end
end end
@ -176,6 +176,6 @@ describe "Thread#raise on same thread" do
Thread.current.raise Thread.current.raise
end end
end end
lambda {t.value}.should raise_error(RuntimeError) -> { t.value }.should raise_error(RuntimeError)
end end
end end