[前][次][番号順一覧][スレッド一覧]

ruby-changes:13318

From: marcandre <ko1@a...>
Date: Fri, 25 Sep 2009 03:56:31 +0900 (JST)
Subject: [ruby-changes:13318] Ruby:r25081 (trunk): * hash.c (Hash#each): Fix documentation to reflect insertion order. A patch by Run Paint Run Run and

marcandre	2009-09-25 03:56:22 +0900 (Fri, 25 Sep 2009)

  New Revision: 25081

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25081

  Log:
    * hash.c (Hash#each): Fix documentation to reflect insertion order. A patch by Run Paint Run Run [ruby-core:23644] and [ruby-core:21231]

  Modified files:
    trunk/hash.c

Index: hash.c
===================================================================
--- hash.c	(revision 25080)
+++ hash.c	(revision 25081)
@@ -2604,9 +2604,8 @@
 /*
  *  A <code>Hash</code> is a collection of key-value pairs. It is
  *  similar to an <code>Array</code>, except that indexing is done via
- *  arbitrary keys of any object type, not an integer index. 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.
+ *  arbitrary keys of any object type, not an integer index. Hashes enumerate
+ *  their values in the order that the corresponding keys were inserted.
  *
  *  Hashes have a <em>default value</em> that is returned when accessing
  *  keys that do not exist in the hash. By default, that value is

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]