From 82d63fcaac2c1100ddb18a0c9e6da84b27f15d60 Mon Sep 17 00:00:00 2001 From: eregon Date: Thu, 21 Dec 2017 09:29:18 +0000 Subject: Simplify Thread#[]= spec git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/core/thread/element_set_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'spec/ruby') diff --git a/spec/ruby/core/thread/element_set_spec.rb b/spec/ruby/core/thread/element_set_spec.rb index fe993df95d..ed92a84fa3 100644 --- a/spec/ruby/core/thread/element_set_spec.rb +++ b/spec/ruby/core/thread/element_set_spec.rb @@ -7,15 +7,13 @@ describe "Thread#[]=" do 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 -- cgit v1.2.3