Actions
Bug #18158
closedPathname#each_entry without block does not return Enumerator
Bug #18158:
Pathname#each_entry without block does not return Enumerator
Description
Pathname#each_child without block returns Enumerator.
But Pathname#each_entry without block does not return Enumerator.
% ruby -r pathname -e 'p Pathname(".").each_child.class'
Enumerator
% ruby -r pathname -e 'p Pathname(".").each_entry.class'
-e:1:in `foreach': no block given (LocalJumpError)
from -e:1:in `each_entry'
from -e:1:in `<main>'
Updated by jeremyevans0 (Jeremy Evans) about 4 years ago
I've submitted a pull request to have Pathname#each_entry return Enumerator: https://github.com/ruby/pathname/pull/10
Updated by jeremyevans0 (Jeremy Evans) almost 4 years ago
- Status changed from Open to Closed
Actions