J
John
I'm looking at the doc for the 1.9.2 Set class, which says (http://
www.ruby-doc.org/stdlib/libdoc/set/rdoc/classes/Set.html):
Set implements a collection of unordered values with no duplicates.
This is a
hybrid of Array‘s intuitive inter-operation facilities and Hash‘s
fast lookup.
The equality of each couple of elements is determined according to
Object#eql?
and Object#hash, since Set uses Hash as storage.
Since the doc explicitly defines Hash as the underlying store, and
since Hash in 1.9.2 observes insertion order (http://ruby-doc.org/core/
classes/Hash.html) during enumeration, I wonder if the doc for Set
should be changed?
www.ruby-doc.org/stdlib/libdoc/set/rdoc/classes/Set.html):
Set implements a collection of unordered values with no duplicates.
This is a
hybrid of Array‘s intuitive inter-operation facilities and Hash‘s
fast lookup.
The equality of each couple of elements is determined according to
Object#eql?
and Object#hash, since Set uses Hash as storage.
Since the doc explicitly defines Hash as the underlying store, and
since Hash in 1.9.2 observes insertion order (http://ruby-doc.org/core/
classes/Hash.html) during enumeration, I wonder if the doc for Set
should be changed?