Project

General

Profile

Bug #6107 ยป 0001-Fix-documentation-for-Abbrev-abbrev.patch

zmack (Andrei Bocan), 03/16/2012 07:41 PM

View differences:

lib/abbrev.rb
# require 'abbrev'
# require 'pp'
#
# pp Abbrev::abbrev(['ruby', 'rules']).sort
# pp Abbrev::abbrev(['ruby', 'rules'])
#
# <i>Generates:</i>
# { "rub" => "ruby",
# "rule" => "rules",
# "rul" => "rules",
# "ruby" => "ruby",
# "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
    (1-1/1)