diegonehab/luasocket — pull request #3 by sam-github (2012-04-26 23:56:12+00:00)
Title: :shutdown() errors on all invalid argument strings

It used to error only on invalid argument strings that started with 's',
'r', or 'b'.

I just had a perplexing moment doing some quick command line interaction with a server, socks were ignoring :shutdown("write"). So, I checked the source, and I should have written shutdown"send", but the arguments are only checked for error if the string is sufficiently close to valid, due to a missing default. Seems better to use lua standard library function for this, it checks all error conditions.

I changed the code in both copies (tcp and unix), but only tested tcp.