Project

General

Profile

Bug #6107

Documentation Abbrev (stdlib) confusing

Added by steenslag (siep korteling) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
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

Associated revisions

Revision d8164e57
Added by drbrain (Eric Hodel) over 7 years ago

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 35290
Added by drbrain (Eric Hodel) over 7 years ago

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

Revision 35290
Added by drbrain (Eric Hodel) over 7 years ago

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

Revision 35290
Added by drbrain (Eric Hodel) over 7 years ago

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

Revision 35290
Added by drbrain (Eric Hodel) over 7 years ago

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

Revision 35290
Added by drbrain (Eric Hodel) over 7 years ago

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

Revision 35290
Added by drbrain (Eric Hodel) over 7 years ago

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

History

Updated by drbrain (Eric Hodel) over 7 years ago

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

Updated by zmack (Andrei Bocan) over 7 years ago

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

Patch to fix this on trunk.

Updated by zmack (Andrei Bocan) over 7 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.

#4

Updated by shyouhei (Shyouhei Urabe) over 7 years ago

  • Status changed from Open to Assigned
#5

Updated by drbrain (Eric Hodel) over 7 years ago

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

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

Also available in: Atom PDF