From: Robert Klemme Date: 2006-02-13T00:08:24+09:00 Subject: Re: immutable and enumerable? Dave Burt wrote: > Enumerable (in Ruby) is a module, included by Array and Hash. For > documentation: > http://www.ruby-doc.org/core/classes/Enumerable.html > > From that page: > " The Enumerable mixin provides collection classes with several > traversal and searching methods, and with the ability to sort. The > class must provide a method each, which yields successive members of > the collection. If Enumerable#max, min, or sort is used, the objects > in the collection must also implement a meaningful <=> operator, as > these methods rely on an ordering between members of the collection." The term "enumerable" is also often used to denote classes that include this module and implement an each method as in "String is enumerable." Kind regards robert