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 Pathname#glob to Dir.[] at spec/rails_helper.rb template #2678

Merged
merged 1 commit into from May 18, 2023

Conversation

r7kamura
Copy link
Contributor

@r7kamura r7kamura commented May 10, 2023

Since Pathname#glob was added in Ruby 2.5, I thought it would be more concise to use this on spec/rails_helper.rb template.

Unlike Dir.[], Pathname#glob returns an array of Pathname, but Kernel.#require works the same way if you give an Pathname as an argument, so I think there should be no problem about this difference here. We could add .map(&:to_s), but I think that would be a bit redundant.

@JonRowe JonRowe merged commit fd5053d into rspec:main May 18, 2023
15 checks passed
@JonRowe
Copy link
Member

JonRowe commented May 18, 2023

Thanks for the suggestion, merged because I can't see why not.

JonRowe added a commit that referenced this pull request May 18, 2023
@JonRowe
Copy link
Member

JonRowe commented Nov 21, 2023

Released in 6.1.0

@r7kamura r7kamura deleted the rails-root-glob branch January 22, 2024 08:10
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.

None yet

2 participants