Project

General

Profile

Bug #4760

Some documentation improvements for Hash#key

Added by utkarshkukreti (Utkarsh Kukreti) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
1.9.2
Backport:
[ruby-core:36377]

Description

Added some documentation for Hash#key, when a Hash contains more than one key with the same value.


Files

0001-Improve-documentation-of-Hash-key.patch (904 Bytes) 0001-Improve-documentation-of-Hash-key.patch utkarshkukreti (Utkarsh Kukreti), 05/22/2011 08:09 AM
#1

Updated by drbrain (Eric Hodel) over 9 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 9 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 9 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.

#4

Updated by drbrain (Eric Hodel) over 9 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]

Also available in: Atom PDF