ruby-changes:51050
From: eregon <ko1@a...>
Date: Wed, 25 Apr 2018 17:16:03 +0900 (JST)
Subject: [ruby-changes:51050] eregon:r63257 (trunk): Fix style in Thread#raise spec
eregon 2018-04-25 17:15:58 +0900 (Wed, 25 Apr 2018) New Revision: 63257 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63257 Log: Fix style in Thread#raise spec * Add space after { and before }. Modified files: trunk/spec/ruby/core/thread/raise_spec.rb Index: spec/ruby/core/thread/raise_spec.rb =================================================================== --- spec/ruby/core/thread/raise_spec.rb (revision 63256) +++ spec/ruby/core/thread/raise_spec.rb (revision 63257) @@ -6,8 +6,8 @@ describe "Thread#raise" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L6 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 thr https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L58 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 thr https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L76 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 thre https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L120 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 thre https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L139 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 thre https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L160 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" d https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/raise_spec.rb#L176 Thread.current.raise end end - lambda {t.value}.should raise_error(RuntimeError) + -> { t.value }.should raise_error(RuntimeError) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/