Hi,
I seem to be running into a lot of subtle bugs lately. This one is
stranger than most.
def shake
@engine.inject do
@engine.run do |key|
@engine.sleepForTime(key, 0.6) do |timePassed, timeSlept|
@x = (rand*2-1)*(1-timeSlept)*30
@y = (rand*2-1)*(1-timeSlept)*30
end
end
end
<--- This empty line needs to be here.
end
My program gives me wrong results when the empty line is not included.
It doesn't throw any syntax error. It just gives me wrong results,
leaving me completely befuddled.
Any guesses on what might be happening?
-Patrick
···
--
Posted via http://www.ruby-forum.com/.