Project

General

Profile

Actions

Bug #4760

closed

Some documentation improvements for Hash#key

Added by utkarshkukreti (Utkarsh Kukreti) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
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
Actions #1

Updated by drbrain (Eric Hodel) almost 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) almost 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

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

Actions #4

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0