< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #13606 has been updated by knu (Akinori MUSHA).
Status changed from Feedback to Rejected
Without any actual use case, there would be no effective definition of equality for enumerators.
FWIW, the initial design policy is, Enumerator is an abstract entity that only guarantees it responds to `each` for enumeration, and it's not your problem as to what's behind a given enumerator. You shouldn't have to care about the equality in the first place.
----------------------------------------
Feature #13606: Enumerator equality and comparison
https://bugs.ruby-lang.org/issues/13606#change-66387
* Author: glebm (Gleb Mazovetskiy)
* Status: Rejected
* 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: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>