Forum: IronRuby can't convert Fixnum into String (TypeError)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
187f7e65bd0de532c3db7e4bc67844c5?d=identicon&s=25 Richard H. (richard_h81)
on 2011-07-08 18:16
This program works with ruby and jruby but it does not work with iron
ruby. I get the following error:

multi-client-tcp-server.rb:29: can't convert Fixnum into String

I'm new to ruby. Can someone help me fix this so it will work with both
ruby, jruby and ironruby?


require 'socket'                # Get sockets from stdlib

server =   # Socket to listen on port 2000
print "hello\n"
loop {                          # Servers run forever
  Thread.start(server.accept) do |client|
    client.puts( # Send the time to the client
  client.puts "Closing the connection. Bye!"
    client.close                # Disconnect from the client
This topic is locked and can not be replied to.