From 664f124e237a168ec5dda675dc3417baec294a83 Mon Sep 17 00:00:00 2001 From: ericgpks Date: Fri, 8 Mar 2024 22:38:33 +0900 Subject: [PATCH] fix: change sample command to use URI.open --- refm/api/src/open-uri.rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refm/api/src/open-uri.rd b/refm/api/src/open-uri.rd index 0d7941edae..9be4d5b794 100644 --- a/refm/api/src/open-uri.rd +++ b/refm/api/src/open-uri.rd @@ -473,7 +473,7 @@ open('http://example.com/') {|f| #@samplecode 例 #@since 2.7.0 require 'open-uri' -URL.open('http://www.ruby-lang.org/') {|f| +URI.open('http://www.ruby-lang.org/') {|f| p f.base_uri #=> # } @@ -493,7 +493,7 @@ open('http://www.ruby-lang.org/') {|f| #@samplecode 例 #@since 2.7.0 require 'open-uri' -URL.open('http://example.com/') {|f| +URI.open('http://example.com/') {|f| p f.meta #=> {"date"=>"Sun, 04 May 2008 11:26:40 GMT", # "content-type"=>"text/html;charset=utf-8",