Skip to content

Conversation

@pvdb
Copy link

@pvdb pvdb commented Sep 20, 2022

Use Enumerable#find to iterate over the candidate directories, not Enumerable#each.

This gives the code a more functional "feel", and also makes it - IMO - slightly more idiomatic, as it avoids setting the "global" (by which I mean: non-local) tmp variable from inside the block.

Use `Enumerable#find` to iterate over the candidates, not `Enumerable.each`.

(this makes the code more functional, and - IMO - slightly more idiomatic,
as it avoids setting the "global" (by which I mean: non-local) `tmp`
variable from inside the block)
@pvdb
Copy link
Author

pvdb commented Sep 29, 2022

@nobu / @hsbt - I hope you don't mind me tagging you on this PR as the two active maintainers of this repo, and I hope you'll consider my suggested changes! 😅

@nobu nobu merged commit b15ddb8 into ruby:master Oct 25, 2022
@pvdb pvdb deleted the refactor_dir_tmpdir branch October 25, 2022 08:22
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