It looks like it's failing on line 39 of acceptor.rb, on the call to setsockopt.
Not knowing TeensyMUD at all, all I can point you to is the man page for "setsockopt" – the errno you're getting, EINVAL, claims that an invalid length was passed into the setsockopt call. I guess you'd have to look at the call to setsockopt and see if it makes sense.
I'm not familiar with TeensyMUD, but trying to run a freshly unzipped version on my computer (os x leopard) generates the same error. I did some snooping, and the error in question is caused by trying to set the SO_LINGER socket option with a boolean rather than the linger struct as defined in my system's socket.h. Try replacing the following line (acceptor.rb line 39)