more Detecting Cycles

Lua, Ruby