From: ts Date: 2002-09-20T22:36:49+09:00 Subject: Re: Error in Sys::Host on FreeBSD >>>>> "B" == Berger, Daniel writes: B> That's interesting. It *should* work without the each method. I just B> tested it on Solaris using an August build of 1.7.2 and it worked ok. B> However, I have not tested it against 1.7.2 on FreeBSD. I must also admit B> that I've never actually tested this on a system with more than 1 IP address B> - I simply don't have access to a system that does. pigeon% cat test.rb #!/usr/bin/ruby require "sys/host" include Sys puts Host.hostname puts Host.ip_addr Host.ip_addr{|ip| puts ip} pigeon% pigeon% ruby test.rb pigeon 138.102.114.46 138.102.114.46 test.rb:8: [BUG] Segmentation fault ruby 1.6.7 (2002-03-01) [i686-linux] Aborted pigeon% The segmentation fault is for free() The difference between the call with or without an block is that you call `host_free(pptr);' when it's called as an iterator. Guy Decoux