Project

General

Profile

Bug #12814

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

I tried to iterate over items in a directory with `each_child` *each.child* testing each item whether it is a directory or not with `directory?`. *directory?*. This was working just fine until I added **`false`** **false** as an argument to `each_child`. *each_child*. 

 ~~~ ruby 
 Pathname.new('.').each_child { |f| p f.realpath } # works as expected 
 Pathname.new('.').each_child(false) { |f| p f.realpath } # throws an error 
 ~~~ 

 As per Ruby doc "By `By default, the yielded pathnames will have enough information to access the files.", files.`, however pathnames yielded with `with_directory=false` are completely useless as file paths.

Back