summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 15:00:31 +0000
committerayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 15:00:31 +0000
commit45ecc02716e19fe906fca28188583bf18c3c70ea (patch)
tree3048f184ce111064c0a96a9ef7d11ed2031fb34a /hash.c
parent1711e80cf16799ee84a75b0089807937e39fdbfe (diff)
downloadruby-45ecc02716e19fe906fca28188583bf18c3c70ea.tar.gz
* hash.c: fix docs for Hash#invert. [ruby-core:66917] [Bug #10612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index bd49a1dd92..d54ab8ada5 100644
--- a/hash.c
+++ b/hash.c
@@ -2093,6 +2093,8 @@ rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
*
* Returns a new hash created by using <i>hsh</i>'s values as keys, and
* the keys as values.
+ * If a key with the same value already exists in the <i>hsh</i>, then
+ * the last one defined will be used, the earlier value(s) will be discarded.
*
* h = { "n" => 100, "m" => 100, "y" => 300, "d" => 200, "a" => 0 }
* h.invert #=> {0=>"a", 100=>"m", 200=>"d", 300=>"y"}