From 51160d24fa6c07272f812c22f985bf7ee7cbcc4e Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 15 Feb 2001 06:01:00 +0000 Subject: * process.c (proc_waitall): new method based on a patch from Brian Fundakowski Feldman . * process.c (last_status_set): objectify $? value (Process::Status). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/ping.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ping.rb') diff --git a/lib/ping.rb b/lib/ping.rb index 48657818c..d698dd0c5 100644 --- a/lib/ping.rb +++ b/lib/ping.rb @@ -47,6 +47,8 @@ module Ping s = TCPsocket.new(host, service) s.close end + rescue Errno::ECONNREFUSED + return true rescue return false end -- cgit