Hehehe... the rail ring was implemented with a tight mini game loop, that extended for a sufficient length (8192 fracunits, or so), where it would move the ring, check collision, move the ring, check collision, move the ring, check collision, all in the same tic. XD XD XD
No idea if you can do that in Lua.