Project

General

Profile

« Previous | Next » 

Revision 287c5da4

Added by Peter Vandenberk over 2 years ago

[ruby/tmpdir] Make Dir.tmpdir more idiomatic and functional

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)

https://github.com/ruby/tmpdir/commit/d1f20ad694