From 90487797b61dcf111c394e6e8844d054ca99b24a Mon Sep 17 00:00:00 2001 From: Fabian Stillhart Date: Tue, 10 Mar 2020 11:43:39 +0100 Subject: [PATCH] fix ruby 2.7.0 deprecation warning: deprecated Object#=~ is called on FalseClass; it always returns nil --- lib/net/ping/external.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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