3 ms·
This site is slow :) I don't know Ruby, but how does this work: get '/', :agent => /curl/ do (slow_thing, time) = slow_down(DEFAULT_SLEEP) "SL
by jrockway 16y ago
This site is slow :)
I don't know Ruby, but how does this work:
get '/', :agent => /curl/ do
(slow_thing, time) = slow_down(DEFAULT_SLEEP)
"SLOWER THAN #{slow_ting}. Putting the brakes on for #{time} seconds.\n"
end
It binds slow_thing and then references it as slow_ting (without the h) in the interpolation? What?
It appears twice so it must be intentional?
- shmeedogg 16y agoOops, that's a typo in code that hasn't been deployed yet. Our regression suite missed it ;-)
- jrockway 16y agoAh, makes sense, you just get the empty string instead of "turtles marching through peanut butter". I am used to Perl where your code won't compile if you reference an undefined variable in a string interpolation.