Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer require_relative for internal requires #668

Merged
merged 1 commit into from
Jul 24, 2019
Merged

Prefer require_relative for internal requires #668

merged 1 commit into from
Jul 24, 2019

Conversation

deivid-rodriguez
Copy link
Contributor

I'd like to use require_relative for internal requires now that ruby 1.8 support has been dropped. It should be faster and it makes it more clear that the file being required is in the same library.

Also, it's nice to do this for bundler (which vendors a copy of thor) because given the LOAD_PATH manipulation bundler does, and that a copy of bundler is now always present in the LOAD_PATH by default in every installation of ruby, require_relative is safer because we are sure we never end up requiring a different copy of bundler than the one we're currently running.

@rafaelfranca rafaelfranca merged commit 69a70e1 into rails:master Jul 24, 2019
@deivid-rodriguez deivid-rodriguez deleted the require_relative branch July 24, 2019 19:49
@deivid-rodriguez
Copy link
Contributor Author

Thank you so much @rafaelfranca :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants