[前][次][番号順一覧][スレッド一覧]

ruby-changes:60518

From: David <ko1@a...>
Date: Thu, 26 Mar 2020 18:06:37 +0900 (JST)
Subject: [ruby-changes:60518] e460c2d033 (master): [ruby/uri] Prefer `require_relative` for loading internal code

https://git.ruby-lang.org/ruby.git/commit/?id=e460c2d033

From e460c2d033b1e7a95417aa93cb4a3cd5cf57b25c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Thu, 5 Dec 2019 16:12:51 +0100
Subject: [ruby/uri] Prefer `require_relative` for loading internal code

So that we don't need to search the LOAD_PATH, given that we know which
files we want to load in advance.

https://github.com/ruby/uri/commit/cbecefb788

diff --git a/lib/uri.rb b/lib/uri.rb
index ea8ea3e..b5405d0 100644
--- a/lib/uri.rb
+++ b/lib/uri.rb
@@ -92,13 +92,13 @@ https://github.com/ruby/ruby/blob/trunk/lib/uri.rb#L92
 module URI
 end
 
-require 'uri/version'
-require 'uri/common'
-require 'uri/generic'
-require 'uri/file'
-require 'uri/ftp'
-require 'uri/http'
-require 'uri/https'
-require 'uri/ldap'
-require 'uri/ldaps'
-require 'uri/mailto'
+require_relative 'uri/version'
+require_relative 'uri/common'
+require_relative 'uri/generic'
+require_relative 'uri/file'
+require_relative 'uri/ftp'
+require_relative 'uri/http'
+require_relative 'uri/https'
+require_relative 'uri/ldap'
+require_relative 'uri/ldaps'
+require_relative 'uri/mailto'
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]