How is TCPSocket.gets implemented?

The following works here, while the recvfrom sample is broken.

require 'socket' 
if fork
  s = TCPServer.new('localhost', 2006)
  while (ss = s.accept) do
    ss.print "Hallo"
    ss.close
  end
else
  sleep 1
  p "los"
  1.upto(3) do
    s = TCPSocket.new('localhost', 2006)
    p s.gets
  end
end

s.

Dave Thomas (2001-11-19 03:35):
 
>   dave[ruby/ruby 12:28:34] ruby -rsocket -rrbconfig \
>     -e "p Config::CONFIG['configure_args']; \
>         TCPSocket.new('localhost','ftp').recvfrom(30)"
> 
>     "--enable-ipv6 --with-lookup-order-hack=INET --prefix=/tc/usr"
>     -e:1:in `recvfrom': getnameinfo: ai_family not supported (SocketError)
>         from -e:1
> 

-- 
Stefan Schmiedl
EDV-Beratung, Programmierung, Schulung
Loreleystr. 5, 94315 Straubing, Germany
Tel. (0 94 21) 74 01 06
Public Key: http://xss.de/stefan.public

shhhh ... I can't hear my code!