Hi,

In message "[ruby-talk:01673] Re: Possible problem with ext/socket in 1.5.2"
    on 00/03/02, itojun / itojun.org <itojun / itojun.org> writes:

|>    p TCPsocket.getaddress('localhost')
|>returns
|>    "::ffff:127.0.0.1"

|	which operating system are you using?

I think he is using Linux box.  The output from extconf.rb would help.
Try

  cd ext/socket
  ruby extconf.rb