Closed midzer closed 3 months ago
and both ways appear to match desired file names.
@midzer :) the thing is that both forms are 99% equivalent. The gotcha with Ruby compared to Python is that one can have multiple ways to implement the same idea. Therefore, if something; next item; end
is almost equivalent to next item if something
.
What Parker highlighted in his explanation is that creating the array [".", ".."]
for each iteration is waste of resources, albeit hardly noticeable in most situations. To that end, your suggestion to use Dir.each_child
is indeed a superior alternative. It's just that we would have to be certain that subdirectories are handled properly as well (Disclaimer: I'm not totally familiar with the pebble platform or the importer code).
LGTM!
@jekyllbot: merge +dev
Thank you @midzer. :)
(Trying) to fix https://github.com/jekyll/jekyll-import/pull/545