   [web] Ruby 1.8.4 - Ping Error Question
  Hey guys and gals, I have a head scratcher for ya. I am writing a windows service that pings various machines to see if they are alive and then accesses their windows services. I had previously been using Ruby 1.8.2.  With this version I could write a small app: #BEGIN CODE# provides Ping.pingecho( hostname, timeout ) methodrequire 'ping'    # ping localhostif( Ping.pingecho("localhost", 10) )   print "localhost is alive and kicking!";else   print "localhost could not be reached!";end#END CODEThis proved to work well on Ruby 1.8.2. When "localhost" (sub in another machine on the network) was connected, pingecho returned true. When the machine was not connected (powered off, cable unplugged, etc..) It would return false. And if the machine did not exist on the network I got an "`initialize': getaddrinfo: no address associated with hostname. (SocketError)" error.  This is intuitive, plain and simple. Now I HAD to upgrade to ruby 1.8.4 to access windows services. now if I run the same program written above, I get false returned when the computer is not connected. I get the same error when the computer does not exist. BUT when the computer is connected I still get false. If I go in and get rid of the begin...rescue...end statements in the ping.rb (holds the Ping module and Ping.pingecho method) I see more descriptive answers to why false is returned. When the computer is not connected a timeout error is raised (this is expected) When the computer is connected an "`initialize': Bad file descriptor - connect(2) (Errno::EBADF)" Error is given. Can anyone tell me why or even perhaps a work around? I have been pulling my hair out about this for quit sometime. (It is very important that I know if the machine can be pinged before I access its services). I thank you for any replies in advance!-Sevans   