From: chastell@... Date: 2015-04-08T22:18:24+00:00 Subject: [ruby-core:68820] [Ruby trunk - Feature #11052] [Open] [PATCH] Blockless Pathname#ascend and #descend return Enumerator Issue #11052 has been reported by Piotr Szotkowski. ---------------------------------------- Feature #11052: [PATCH] Blockless Pathname#ascend and #descend return Enumerator https://bugs.ruby-lang.org/issues/11052 * Author: Piotr Szotkowski * Status: Open * Priority: Normal * Assignee: ---------------------------------------- It would be beneficial for blockless `Pathname#ascend` and `#descend` to return an `Enumerator` (rather than raise a `LocalJumpError`). Example use case of finding the Git root of the current directory: ~~~ git_dir = Pathname.new('.git') Pathname.pwd.ascend.find { |dir| dir.entries.include?(git_dir) } ~~~ -- https://bugs.ruby-lang.org/