Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (35 sloc) 0.548 kB
# Testing the TLC.
assert 'true', %{
s = nil
Thread.new {
s = [1,2,3,4,5]
GC.start
}.join
p s == [1,2,3,4,5]
}
assert 'true', %{
s = nil
Thread.new {
1.times { s = [1,2,3,4,5]; GC.start }
}.join
p s == [1,2,3,4,5]
}
assert 'true', %{
def foo
Thread.new { yield }.join
end
s = nil
foo { s = [1,2,3,4,5]; GC.start }
p s == [1,2,3,4,5]
}
assert 'true', %{
def bar
Thread.new { yield }.join
end
def foo
bar { yield }
end
s = nil
foo { s = [1,2,3,4,5]; GC.start }
p s == [1,2,3,4,5]
}
Jump to Line
Something went wrong with that request. Please try again.