Write seems to work OK and puts too, but I could swear I had the same
issue with puts on another Ubuntu box with same specs and ruby 1.8.7.
I'm using Ubuntu 10.10, 2.6.35-27 kernel and ruby 1.9.2-p180 and ruby
1.8.7.
*
* send _mesg_ via _basicsocket_.
*
* _mesg_ should be a string.
*
* _flags_ should be a bitwise OR of Socket::MSG_* constants.
*
* _dest_sockaddr_ should be a packed sockaddr string or an addrinfo.
*
* TCPSocket.open("localhost", 80) {|s|
* s.send "GET / HTTP/1.0\r\n\r\n", 0
* p s.read
* }
*/
Try setting flags to zero instead and it'll probably work: