diff --git a/lib/net/ping/external.rb b/lib/net/ping/external.rb index 9ba4051..bd62220 100644 --- a/lib/net/ping/external.rb +++ b/lib/net/ping/external.rb @@ -66,7 +66,7 @@ def ping(host = @host, count = 1, interval = 1, timeout = @timeout) bool = true # Success, at least one response. end - if err & err =~ /warning/i + if err & (err =~ /warning/i) @warning = err.chomp end when 2