lib/reversed.rb in reversed-0.4.1 vs lib/reversed.rb in reversed-0.4.2

- old
+ new

@@ -40,5 +40,13 @@ retry end end end end + +# not ideal, but fixes error on timeout with Ruby 3.1+ +# (which removed TimeoutError) +# need to define rather than rescue NameError +# to allow for multiple nameservers to be checked +# define here rather than for duration of search method for thread-safety +# apply to all Ruby versions to fix deprecation warnings +Net::DNS::Resolver::TimeoutError = Timeout::Error