summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-09-21 15:54:39 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-09-21 15:54:39 +0200
commitc19bcf38ebe4f483bdb2d76f2115eb70f056f8c6 (patch)
treec3d7101a17fbb86e62b0fb6194763eaac613061e /spec
parent10d795cfca7ec688e0dead63568277ea37e4977b (diff)
Fix Thread leak in Thread#join specs
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/thread/join_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/ruby/core/thread/join_spec.rb b/spec/ruby/core/thread/join_spec.rb
index 6477e17b6e..06e9049808 100644
--- a/spec/ruby/core/thread/join_spec.rb
+++ b/spec/ruby/core/thread/join_spec.rb
@@ -22,10 +22,11 @@ describe "Thread#join" do
end
it "raises TypeError if the argument is not a valid timeout" do
- t = Thread.new {sleep}
+ t = Thread.new { sleep }
-> { t.join(:foo) }.should raise_error TypeError
-> { t.join("bar") }.should raise_error TypeError
t.kill
+ t.join
end
it "returns nil if it is not finished when given a timeout" do