From: Yucheng Wang Date: 2012-06-20T02:40:10+09:00 Subject: Re: From Java Socket to Ruby Socket Dan Connelly wrote in post #1065181: >> 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. Thanks Dan, It works! Daniel -- Posted via http://www.ruby-forum.com/.