I have been trying to figure this out without any luck, maybe someone
here will know what is going on. I notice that it gets the first line
and then cuts off at the new line, but I have no idea why it is doing
this.



#####################################################################
........
puts "a\nb".class
=> string

hostname = 'localhost'
port = 5000
s = TCPSocket.open(hostname, port)
s.puts "a\nb"
s.close

###########################################################
..........

server = TCPServer.open(5000)
loop do
Thread.start(server.accept) do |client|
message = client.gets

puts message
=> a

###########################################################

-- 
Posted via http://www.ruby-forum.com/.