Bug #4760
closedSome documentation improvements for Hash#key
Description
Added some documentation for Hash#key, when a Hash contains more than one key with the same value.
Files
Updated by drbrain (Eric Hodel) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r31705.
Utkarsh, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- hash.c: Improve documentation of Hash#key. Patch by Utkarsh
Kukreti. [Ruby 1.9 - Bug #4760]
Updated by mame (Yusuke Endoh) over 13 years ago
- Status changed from Closed to Open
Hello,
Returns the key of the first occurrence of a given value.
Is this really guaranteed?
Writing a rdoc means deciding a spec.
Do not decide a spec without discussion.
Eric, please be careful to review a document patch.
--
Yusuke Endoh mame@tsg.ne.jp
Updated by drbrain (Eric Hodel) over 13 years ago
I thought this was ok since Hash is now sorted.
I will change this from "the first occurrence" to "an occurrence" since this is not guaranteed to be a specification of Hash#key.
Updated by drbrain (Eric Hodel) over 13 years ago
- Status changed from Open to Closed
This issue was solved with changeset r31878.
Utkarsh, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- hash.c (key_i): Change rdoc from "the first occurence" to "an
occurrence" since first occurrence is not a specification of
Hash#key. [Ruby 1.9 - Bug #4760]