From 9498d66c5d22abaa45ac135905ebfbe5be755c79 Mon Sep 17 00:00:00 2001 From: eregon Date: Wed, 25 Apr 2018 08:15:58 +0000 Subject: 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 --- spec/ruby/core/thread/raise_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'spec/ruby/core/thread') diff --git a/spec/ruby/core/thread/raise_spec.rb b/spec/ruby/core/thread/raise_spec.rb index 20c8b149b8..f325622f24 100644 --- a/spec/ruby/core/thread/raise_spec.rb +++ b/spec/ruby/core/thread/raise_spec.rb @@ -6,8 +6,8 @@ describe "Thread#raise" do it "ignores dead threads" do t = Thread.new { :dead } Thread.pass while t.alive? - lambda {t.raise("Kill the thread")}.should_not raise_error - lambda {t.value}.should_not raise_error + -> { t.raise("Kill the thread") }.should_not raise_error + -> { t.value }.should_not raise_error end end @@ -58,7 +58,7 @@ describe "Thread#raise on a sleeping thread" do ThreadSpecs.spin_until_sleeping(t) t.raise - lambda { t.value }.should raise_error(RuntimeError) + -> { t.value }.should raise_error(RuntimeError) end 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) t.raise end - lambda {t.value}.should raise_error(RuntimeError) + -> { t.value }.should raise_error(RuntimeError) end end @@ -120,7 +120,7 @@ describe "Thread#raise on a running thread" do end t.raise - lambda {t.value}.should raise_error(RuntimeError) + -> { t.value }.should raise_error(RuntimeError) end 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 Thread.pass until raised t.raise RangeError - lambda {t.value}.should raise_error(RangeError) + -> { t.value }.should raise_error(RangeError) end end @@ -160,7 +160,7 @@ describe "Thread#raise on a running thread" do Thread.pass until raised t.raise end - lambda {t.value}.should raise_error(RuntimeError) + -> { t.value }.should raise_error(RuntimeError) end end @@ -176,6 +176,6 @@ describe "Thread#raise on same thread" do Thread.current.raise end end - lambda {t.value}.should raise_error(RuntimeError) + -> { t.value }.should raise_error(RuntimeError) end end -- cgit v1.2.3