Project

General

Profile

Actions

Bug #6107

closed

Documentation Abbrev (stdlib) confusing

Added by steenslag (siep korteling) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
Backport:
[ruby-core:43058]

Description

The example in the documentation suggests Abbrev::abrev returns an Array. It does return a hash; the array is the result of the #sort method.


Files

Updated by drbrain (Eric Hodel) about 12 years ago

  • Assignee set to drbrain (Eric Hodel)
  • Priority changed from 3 to Normal

Updated by zmack (Andrei Bocan) about 12 years ago

  • File 0001-Fix-documentation-for-Abbrev-abbrev.patch added

Patch to fix this on trunk.

Updated by zmack (Andrei Bocan) about 12 years ago

Previous patch is bunk, please disregard.

Attached patch removes the sort from the example and updates the example output with the actual hash.

Actions #4

Updated by shyouhei (Shyouhei Urabe) about 12 years ago

  • Status changed from Open to Assigned
Actions #5

Updated by drbrain (Eric Hodel) about 12 years ago

  • File deleted (0001-Fix-documentation-for-Abbrev-abbrev.patch)
Actions #6

Updated by drbrain (Eric Hodel) about 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35290.
siep, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/abbrev.rb: Clarified that Abbrev.abbrev returns a Hash instead
    of an Array. Patch by Andrei Bocan. [ruby-trunk - Bug #6107]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0