1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
drbrain 2012-04-10 20:15:05 +00:00
parent 1a7f3d7cb7
commit d8164e5724
2 changed files with 15 additions and 9 deletions

View file

@ -1,3 +1,8 @@
Wed Apr 11 05:14:51 2012 Eric Hodel <drbrain@segment7.net>
* lib/abbrev.rb: Clarified that Abbrev.abbrev returns a Hash instead
of an Array. Patch by Andrei Bocan. [ruby-trunk - Bug #6107]
Wed Apr 11 03:02:24 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com> Wed Apr 11 03:02:24 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* ext/ripper/lib/ripper/sexp.rb: fix spelling. patched by * ext/ripper/lib/ripper/sexp.rb: fix spelling. patched by

View file

@ -10,22 +10,23 @@
# $Id$ # $Id$
#++ #++
# Calculate the set of unique abbreviations for a given set of strings. ##
# Calculates the set of unique abbreviations for a given set of strings.
# #
# require 'abbrev' # require 'abbrev'
# require 'pp' # require 'pp'
# #
# pp Abbrev::abbrev(['ruby', 'rules']).sort # pp Abbrev.abbrev(['ruby', 'rules'])
# #
# <i>Generates:</i> # Generates:
# #
# [["rub", "ruby"], # { "rub" => "ruby",
# ["ruby", "ruby"], # "ruby" => "ruby",
# ["rul", "rules"], # "rul" => "rules",
# ["rule", "rules"], # "rule" => "rules",
# ["rules", "rules"]] # "rules" => "rules" }
# #
# Also adds an +abbrev+ method to class +Array+. # It also adds an +abbrev+ method to class Array.
module Abbrev module Abbrev