mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix Thread leak in Thread#join specs
This commit is contained in:
parent
10d795cfca
commit
c19bcf38eb
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue