[前][次][番号順一覧][スレッド一覧]

ruby-changes:49272

From: eregon <ko1@a...>
Date: Thu, 21 Dec 2017 18:29:21 +0900 (JST)
Subject: [ruby-changes:49272] eregon:r61389 (trunk): Simplify Thread#[]= spec

eregon	2017-12-21 18:29:18 +0900 (Thu, 21 Dec 2017)

  New Revision: 61389

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61389

  Log:
    Simplify Thread#[]= spec

  Modified files:
    trunk/spec/ruby/core/thread/element_set_spec.rb
Index: spec/ruby/core/thread/element_set_spec.rb
===================================================================
--- spec/ruby/core/thread/element_set_spec.rb	(revision 61388)
+++ spec/ruby/core/thread/element_set_spec.rb	(revision 61389)
@@ -7,15 +7,13 @@ describe "Thread#[]=" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/element_set_spec.rb#L7
   end
 
   it "raises a RuntimeError if the thread is frozen" do
-    running = false
-    t = Thread.new do
+    Thread.new do
       th = Thread.current
       th.freeze
       -> {
         th[:foo] = "bar"
       }.should raise_error(RuntimeError, /frozen/)
-    end
-    t.join
+    end.join
   end
 
   it "raises exceptions on the wrong type of keys" do

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]