@host = "127.0.0.1"
@port = "8080"
@server = TCPserver.new(@host, @port)
loop do
  Thread.start(@server.accept) do |con|
    hostname = con.addr[2]
    puts hostname
  end
end

On my box (OS X 10.2.6, ruby 1.8), hostname is 'localhost'.

On my developer's box (FreeBSD 4.8 stable, ruby 1.8), hostname is
'localhost.subdomain.domain'.

I think my box is correct. Is this a bug?