Excerpts from message of Sun May 31 06:38:54 +0300 2009:
> Bug #1545: Patches for the Hash Documentation
> http://redmine.ruby-lang.org/issues/show/1545
> 
> Author: Run Paint Run Run
> Status: Open, Priority: Normal
> ruby -v: ruby 1.9.2dev (2009-05-28 trunk 23601) [i686-linux]
> 
> I've attached a couple of patches against hash.c to fix minor documentation
> typos. The 7th is an attempt to fix the verbiage regarding the ordering of
> hashes which states "The order in which you traverse a hash by either key or
> value may seem arbitrary, and will generally not be in the insertion order."
> This contradicts the doc/NEWS-1.9.1 file which, correctly, explains "Hash
> preserves order.  It enumerates its elements in the order in which the keys are
> inserted." I've tried to use the latter wording as much as possible in my
> suggested modification.
 
The wording should maybe *not* be changed? Even though I
have no doubt that everyone and their mothers will rely on
insertion order in the future, it is specified that it is
implementation-specific behaviour. (In my mind, using it
implies Hash being the wrong data structure, but that is
naturally debatable.)

Of course, if we view the RDoc as strictly applying to MRI
only, it is fine to change...a small mention of possible
unportability is OK in that case. But I am not sure if it
is feasible to make that assumption.


Eero

--
Magic is insufficiently advanced technology.