Project

General

Profile

Actions

Bug #18158

closed

Pathname#each_entry without block does not return Enumerator

Added by znz (Kazuhiro NISHIYAMA) over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:105185]

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) over 1 year ago

I've submitted a pull request to have Pathname#each_entry return Enumerator: https://github.com/ruby/pathname/pull/10

Actions #2

Updated by jeremyevans0 (Jeremy Evans) about 1 year ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0