summaryrefslogtreecommitdiff
path: root/lib/abbrev.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-10 20:15:05 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-10 20:15:05 +0000
commitd8164e5724ca29e50679524913d818adc0cb3b29 (patch)
tree3945e6cf6e4bda20a95803dad7c5b4ca3d414157 /lib/abbrev.rb
parent1a7f3d7cb7e36ed57d6acd0538e9db69ad050481 (diff)
* 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
Diffstat (limited to 'lib/abbrev.rb')
-rw-r--r--lib/abbrev.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/abbrev.rb b/lib/abbrev.rb
index e6e810bf69..d3ef272219 100644
--- a/lib/abbrev.rb
+++ b/lib/abbrev.rb
@@ -10,22 +10,23 @@
# $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 'pp'
#
-# pp Abbrev::abbrev(['ruby', 'rules']).sort
+# pp Abbrev.abbrev(['ruby', 'rules'])
#
-# <i>Generates:</i>
+# Generates:
#
-# [["rub", "ruby"],
-# ["ruby", "ruby"],
-# ["rul", "rules"],
-# ["rule", "rules"],
-# ["rules", "rules"]]
+# { "rub" => "ruby",
+# "ruby" => "ruby",
+# "rul" => "rules",
+# "rule" => "rules",
+# "rules" => "rules" }
#
-# Also adds an +abbrev+ method to class +Array+.
+# It also adds an +abbrev+ method to class Array.
module Abbrev