summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-15 06:01:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-15 06:01:00 +0000
commit011ed67616f4dd9b1ca983d32bdfca65e358e3dd (patch)
tree75d92d20faf78567cff8f4ef14eba6bd46ee4de0 /lib
parent756dcb00342274f9fa7bb4a1e9980fac73e31f43 (diff)
* process.c (proc_waitall): new method based on a patch from Brian
Fundakowski Feldman <green@green.dyndns.org>. * process.c (last_status_set): objectify $? value (Process::Status). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/ping.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ping.rb b/lib/ping.rb
index 48657818cc..d698dd0c52 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