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

ruby-changes:70721

From: David <ko1@a...>
Date: Tue, 4 Jan 2022 16:38:32 +0900 (JST)
Subject: [ruby-changes:70721] f0669fb6cb (master): [ruby/optparse] Use `require_relative` for internal requires (https://github.com/ruby/optparse/pull/28)

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

From f0669fb6cbdbad499974252ef2d955a608d0adc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Tue, 4 Jan 2022 08:32:45 +0100
Subject: [ruby/optparse] Use `require_relative` for internal requires
 (https://github.com/ruby/optparse/pull/28)

https://github.com/ruby/optparse/commit/e4f2682128
---
 lib/optparse/ac.rb         | 2 +-
 lib/optparse/date.rb       | 2 +-
 lib/optparse/kwargs.rb     | 2 +-
 lib/optparse/shellwords.rb | 2 +-
 lib/optparse/time.rb       | 2 +-
 lib/optparse/uri.rb        | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/optparse/ac.rb b/lib/optparse/ac.rb
index 9d520101aad..0953725e46e 100644
--- a/lib/optparse/ac.rb
+++ b/lib/optparse/ac.rb
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse/ac.rb#L1
 # frozen_string_literal: false
-require 'optparse'
+require_relative '../optparse'
 
 class OptionParser::AC < OptionParser
   private
diff --git a/lib/optparse/date.rb b/lib/optparse/date.rb
index d6649c83f1a..7bbf12b77f8 100644
--- a/lib/optparse/date.rb
+++ b/lib/optparse/date.rb
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse/date.rb#L1
 # frozen_string_literal: false
-require 'optparse'
+require_relative '../optparse'
 require 'date'
 
 OptionParser.accept(DateTime) do |s,|
diff --git a/lib/optparse/kwargs.rb b/lib/optparse/kwargs.rb
index ccf20c65e9e..992aca467eb 100644
--- a/lib/optparse/kwargs.rb
+++ b/lib/optparse/kwargs.rb
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse/kwargs.rb#L1
 # frozen_string_literal: true
-require 'optparse'
+require_relative '../optparse'
 
 class OptionParser
   # :call-seq:
diff --git a/lib/optparse/shellwords.rb b/lib/optparse/shellwords.rb
index bf31701b963..4feb1993d96 100644
--- a/lib/optparse/shellwords.rb
+++ b/lib/optparse/shellwords.rb
@@ -2,6 +2,6 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse/shellwords.rb#L2
 # -*- ruby -*-
 
 require 'shellwords'
-require 'optparse'
+require_relative '../optparse'
 
 OptionParser.accept(Shellwords) {|s,| Shellwords.shellwords(s)}
diff --git a/lib/optparse/time.rb b/lib/optparse/time.rb
index ffc6ff000d9..0ce651f6f68 100644
--- a/lib/optparse/time.rb
+++ b/lib/optparse/time.rb
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse/time.rb#L1
 # frozen_string_literal: false
-require 'optparse'
+require_relative '../optparse'
 require 'time'
 
 OptionParser.accept(Time) do |s,|
diff --git a/lib/optparse/uri.rb b/lib/optparse/uri.rb
index 51550cf91b1..31d10593b15 100644
--- a/lib/optparse/uri.rb
+++ b/lib/optparse/uri.rb
@@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse/uri.rb#L1
 # frozen_string_literal: false
 # -*- ruby -*-
 
-require 'optparse'
+require_relative '../optparse'
 require 'uri'
 
 OptionParser.accept(URI) {|s,| URI.parse(s) if s}
-- 
cgit v1.2.1


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

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