`puts -1` isn't currently valid. You have to do `puts(-1)`. It should work though. reported by @zweifisch