Project

General

Profile

Bug #10928 ยป optparse-switch-summarize.patch

jeremyevans0 (Jeremy Evans), 07/07/2019 08:56 PM

View differences:

lib/optparse.rb
# +max+ columns.
# +indent+:: Prefix string indents all summarized lines.
#
def summarize(sdone = [], ldone = [], width = 1, max = width - 1, indent = "")
def summarize(sdone = {}, ldone = {}, width = 1, max = width - 1, indent = "")
sopts, lopts = [], [], nil
@short.each {|s| sdone.fetch(s) {sopts << s}; sdone[s] = true} if @short
@long.each {|s| ldone.fetch(s) {lopts << s}; ldone[s] = true} if @long
    (1-1/1)