From 0cfc90fd9d78180a24d5c519447f76247972800f Mon Sep 17 00:00:00 2001 From: marcandre Date: Fri, 2 Nov 2018 17:52:33 +0000 Subject: [PATCH 1/2] lib/*: Prefer require_relative over require. [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/shell/builtin-command.rb | 2 +- lib/shell/command-processor.rb | 4 ++-- lib/shell/system-command.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/shell/builtin-command.rb b/lib/shell/builtin-command.rb index e419a68..a6a9d23 100644 --- a/lib/shell/builtin-command.rb +++ b/lib/shell/builtin-command.rb @@ -10,7 +10,7 @@ # # -require "shell/filter" +require_relative "filter" class Shell class BuiltInCommand < Filter diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb index b52cb00..a6b55f5 100644 --- a/lib/shell/command-processor.rb +++ b/lib/shell/command-processor.rb @@ -12,8 +12,8 @@ require "e2mmap" -require "shell/error" -require "shell/filter" +require_relative "error" +require_relative "filter" require "shell/system-command" require "shell/builtin-command" diff --git a/lib/shell/system-command.rb b/lib/shell/system-command.rb index af22ed9..767a9ee 100644 --- a/lib/shell/system-command.rb +++ b/lib/shell/system-command.rb @@ -10,7 +10,7 @@ # # -require "shell/filter" +require_relative "filter" class Shell class SystemCommand < Filter From fe5ce4753ff2fb29f29ad3cff63b1b467bc3de19 Mon Sep 17 00:00:00 2001 From: marcandre Date: Fri, 2 Nov 2018 17:52:43 +0000 Subject: [PATCH 2/2] lib/*: Prefer require_relative over require, remove explicit extension [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/shell/command-processor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb index a6b55f5..00357e0 100644 --- a/lib/shell/command-processor.rb +++ b/lib/shell/command-processor.rb @@ -14,8 +14,8 @@ require_relative "error" require_relative "filter" -require "shell/system-command" -require "shell/builtin-command" +require_relative "system-command" +require_relative "builtin-command" class Shell # In order to execute a command on your OS, you need to define it as a