On Fri, Jan 23, 2004 at 05:44:56AM +0900, Dalibor Sramek wrote:
> I have upgraded and one of my scripts now dies with ArgumentError while
> calling Socket.gethostbyname - see bellow.
> Can someone explain to me why this is happening? Can it be caused by an
> interference with IPv6?

Dalibor,

It's BSD-specific. I had the same problem and reported it as:
http://www.ruby-lang.org/cgi-bin/ruby-bugs/incoming?id=1243

-neil




> Thanks,

> Dalibor Sramek

> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

> dali@epot:~$ ruby -v
> ruby 1.8.1 (2003-12-25) [i386-freebsd5.2]
> dali@epot:~$ irb
> irb(main):001:0> require 'socket'
> => true
> irb(main):002:0> Socket.gethostbyname('146.102.77.77')
> ArgumentError: NULL pointer given
>         from (irb):2:in ethostbyname'
>         from (irb):2
> irb(main):003:0>

> dali@epot:~$ nslookup 146.102.77.77
> Server:  ns1.casablanca.cz
> Address:  217.11.224.1

> Name:    sM05h01.vse.cz
> Address:  146.102.77.77


> --
> Dalibor Sramek  http://www.insula.cz/dali  |  In the eyes of cats,
>                 dalibor.sramek / insula.cz   |  all things belong to cats.