-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use
require_relative
in the Parser codebase (#1003)
If there are many searches in the `$LOAD_PATH` in the user environment, require will perform unnecessary searches that are not needed. In contrast, `require_relative` is efficient because it uses a relative path. Parser gem requires Ruby 2.0+, it is possible to use `require_relative`, which was introduced in Ruby 1.9. https://github.com/whitequark/parser/blob/v3.3.0.5/parser.gemspec#L27
- Loading branch information
Showing
24 changed files
with
126 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'parser/ruby18' | ||
require 'parser/ruby19' | ||
require 'parser/ruby20' | ||
require 'parser/ruby21' | ||
require 'parser/ruby22' | ||
require 'parser/ruby23' | ||
require 'parser/ruby24' | ||
require 'parser/ruby25' | ||
require 'parser/ruby26' | ||
require 'parser/ruby27' | ||
require 'parser/ruby30' | ||
require 'parser/ruby31' | ||
require 'parser/ruby32' | ||
require 'parser/ruby33' | ||
require 'parser/ruby34' | ||
require_relative 'ruby18' | ||
require_relative 'ruby19' | ||
require_relative 'ruby20' | ||
require_relative 'ruby21' | ||
require_relative 'ruby22' | ||
require_relative 'ruby23' | ||
require_relative 'ruby24' | ||
require_relative 'ruby25' | ||
require_relative 'ruby26' | ||
require_relative 'ruby27' | ||
require_relative 'ruby30' | ||
require_relative 'ruby31' | ||
require_relative 'ruby32' | ||
require_relative 'ruby33' | ||
require_relative 'ruby34' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2207,7 +2207,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1947,7 +1947,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2184,7 +2184,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2362,7 +2362,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2366,7 +2366,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2373,7 +2373,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2379,7 +2379,7 @@ end | |
|
||
---- header | ||
|
||
require 'parser' | ||
require_relative '../parser' | ||
|
||
---- inner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2416,7 +2416,7 @@ end | |
---- header | ||
require 'parser' | ||
require_relative '../parser' | ||
---- inner | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2406,7 +2406,7 @@ end | |
---- header | ||
require 'parser' | ||
require_relative '../parser' | ||
---- inner | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2417,7 +2417,7 @@ end | |
---- header | ||
require 'parser' | ||
require_relative '../parser' | ||
---- inner | ||
|
Oops, something went wrong.