summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-24 18:56:22 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-24 18:56:22 +0000
commitce1b5896ef227015fc7df4a7154e5abe1942bc46 (patch)
tree23b4d0344c227ce9f9e6e2c16a17f84834b6a32e
parentcc099f4587c6d45c1b57184cbfdee76937449507 (diff)
downloadruby-ce1b5896ef227015fc7df4a7154e5abe1942bc46.tar.gz
ruby-ce1b5896ef227015fc7df4a7154e5abe1942bc46.tar.xz
ruby-ce1b5896ef227015fc7df4a7154e5abe1942bc46.zip
* hash.c (Hash#each): Fix documentation to reflect insertion order. A patch by Run Paint Run Run [ruby-core:23644] and [ruby-core:21231]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index 78e208727..713048f4c 100644
--- a/hash.c
+++ b/hash.c
@@ -2604,9 +2604,8 @@ env_update(VALUE env, VALUE hash)
/*
* 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