From 3816cd945d68eac7ca8fecbc9d71f878ff3e7b3d Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Fri, 20 Dec 2019 01:40:00 +0900 Subject: [PATCH] Add `URI#open` to warning message --- lib/open-uri.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open-uri.rb b/lib/open-uri.rb index c099eba6a0..c52f67f525 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -15,7 +15,7 @@ module Kernel (name.respond_to?(:to_str) && %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name && (uri = URI.parse(name)).respond_to?(:open)) - warn('calling URI.open via Kernel#open is deprecated, call URI.open directly', uplevel: 1) + warn('calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open', uplevel: 1) URI.open(name, *rest, **kw, &block) else open_uri_original_open(name, *rest, **kw, &block)