From: Dan Connelly Date: 2012-06-20T02:32:21+09:00 Subject: Re: From Java Socket to Ruby Socket > Serv.write(firstCommand.to_i) > Serv.write(SecondeCommand.to_i) Write converts its argument to a string. For example: class Fixnum def to_s "hello!" end end STDOUT.write 42 STDOUT.write "\n" This prints "hello!", not 42. I think you want putc: Serv.putc firstCommand.to_i Serv.putc SecondeCommand.to_i # spelling? BTW, generally variables begin with lowercase letters in Ruby. -- Posted via http://www.ruby-forum.com/.