summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2022-01-04 08:32:45 +0100
committergit <[email protected]>2022-01-04 16:38:17 +0900
commitf0669fb6cbdbad499974252ef2d955a608d0adc1 (patch)
treea803ae6c953806877d0f857dcd07f87dcc06f9b4
parent5074aa19841dac0c1fcb037cd8306c5fe8e8516a (diff)
[ruby/optparse] Use `require_relative` for internal requires (https://github.com/ruby/optparse/pull/28)
https://github.com/ruby/optparse/commit/e4f2682128
-rw-r--r--lib/optparse/ac.rb2
-rw-r--r--lib/optparse/date.rb2
-rw-r--r--lib/optparse/kwargs.rb2
-rw-r--r--lib/optparse/shellwords.rb2
-rw-r--r--lib/optparse/time.rb2
-rw-r--r--lib/optparse/uri.rb2
6 files changed, 6 insertions, 6 deletions
diff --git a/lib/optparse/ac.rb b/lib/optparse/ac.rb
index 9d520101aa..0953725e46 100644
--- a/lib/optparse/ac.rb
+++ b/lib/optparse/ac.rb
@@ -1,5 +1,5 @@
# 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 d6649c83f1..7bbf12b77f 100644
--- a/lib/optparse/date.rb
+++ b/lib/optparse/date.rb
@@ -1,5 +1,5 @@
# 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 ccf20c65e9..992aca467e 100644
--- a/lib/optparse/kwargs.rb
+++ b/lib/optparse/kwargs.rb
@@ -1,5 +1,5 @@
# 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 bf31701b96..4feb1993d9 100644
--- a/lib/optparse/shellwords.rb
+++ b/lib/optparse/shellwords.rb
@@ -2,6 +2,6 @@
# -*- 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 ffc6ff000d..0ce651f6f6 100644
--- a/lib/optparse/time.rb
+++ b/lib/optparse/time.rb
@@ -1,5 +1,5 @@
# 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 51550cf91b..31d10593b1 100644
--- a/lib/optparse/uri.rb
+++ b/lib/optparse/uri.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
# -*- ruby -*-
-require 'optparse'
+require_relative '../optparse'
require 'uri'
OptionParser.accept(URI) {|s,| URI.parse(s) if s}