diff options
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/thread/element_set_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
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 |