From: 6ftdan@... Date: 2015-12-15T20:39:37+00:00 Subject: [ruby-core:72160] [Ruby trunk - Feature #11824] [Open] Add Enumerator#to_ary for added implicit behavior Issue #11824 has been reported by Daniel P. Clark. ---------------------------------------- Feature #11824: Add Enumerator#to_ary for added implicit behavior https://bugs.ruby-lang.org/issues/11824 * Author: Daniel P. Clark * Status: Open * Priority: Normal * Assignee: ---------------------------------------- Calling `Enumerator#to_a` many times can become a bit ugly in a code base. I propose these changes to Enumerator to allow implicit Array use of all Enumerators. ~~~ruby class Enumerator def to_ary to_a end def method_missing m, *a, &b return to_a.send(m, *a, &b) if Array.instance_methods.include? m super end end ~~~ -- https://bugs.ruby-lang.org/