Gruby
1
@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?
IMO
it depends from /etc/hosts and the OS name resolution , not from ruby
···
il 11 Sep 2003 11:54:58 -0700, gruby@sysarchitects.com (John) ha scritto::
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?