From: glex.spb@... Date: 2017-05-27T23:22:45+00:00 Subject: [ruby-core:81426] [Ruby trunk Feature#13606] Enumerator equality and comparison Issue #13606 has been reported by glebm (Gleb Mazovetskiy). ---------------------------------------- Feature #13606: Enumerator equality and comparison https://bugs.ruby-lang.org/issues/13606 * Author: glebm (Gleb Mazovetskiy) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- In Ruby, most objects are compared by value. What do you think about `Enumerator`s following the same pattern? I think this would greatly increase the expressiveness of Ruby. Proposal: Two `Enumerator`s should be considered equal (`==`) if they yield the same number of elements and these elements are equal (`==`). If both of the `Enumerator`s are infinite, the equality operator never terminates. `<=>` should be handled similarly. -- https://bugs.ruby-lang.org/ Unsubscribe: