I have the same problem posted here a year ago:
Ruby Loop error in thread
Here's the code (almost the same as in the topic above)
class NewObject
def my_funk
t = Thread.new {
until false do
puts sleep 15
end
}
t.join
end
end
if __FILE__ == $0
s = NewObject.new()
s.my_funk
end
And here is the conclusion:
15
42
36
38
33
45
42
33
32
40
Basically the code prints the actual number of seconds. Does anyone know what is going on here and how to fix it?
I am running Windows 7 and Ruby 1.8.7
source
share