async
async copied to clipboard
Allow `traverse` to return enumerator.
Do you mind explaining the expected use case? Because we have traverse which is very close to the implementation.
If I recall, I was using #traverse to return a collection of nodes, like .traverse.map { |node, value|
would but got a LocalJumpError
. In retrospect, I think I should have proposed an return enum_for(__method__) { size } unless block_given?
form for #traverse rather than a new method.
Originally posted by @havenwood in https://github.com/socketry/async/pull/55#issuecomment-858750717