Forum: Ruby OptionParser patch

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4adc88eff7bf918a302b1f52a4a248b3?d=identicon&s=25 Tom Pollard (tomp)
on 2007-03-09 21:49
(Received via mailing list)
Hi,

I wanted to submit a patch for optparse.rb to make it easier to add
general text to the usage summary.  There were three things I wanted
to change:

1. Fix OptionParser#separator so that it correctly handles strings
containing newlines.
2. Introduce 'text' as and alias for the 'separator' method, since
the latter doesn't sound appropriate for adding a paragraph of text
at a time.
3. Add a 'bottom_text' method, which would force the text to appear
after the option summary.

Before I submitted this, I thought I'd ask for comments, or
additional suggestions.

Thanks,

Tom
38ed06ce1dd79b986574e9c7b7b374f8?d=identicon&s=25 Tomas Pospisek's Mailing Lists (Guest)
on 2007-03-09 23:25
(Received via mailing list)
On Sat, 10 Mar 2007, Tom Pollard wrote:

>    option summary.
>
> Before I submitted this, I thought I'd ask for comments, or additional
> suggestions.

I only comment on the last item, since I don't know OptionParser enough.
#3 sounds really useful to me.
*t

--
4adc88eff7bf918a302b1f52a4a248b3?d=identicon&s=25 Tom Pollard (tomp)
on 2007-03-12 15:03
(Received via mailing list)
On Mar 9, 2007, at 5:25 PM, Tomas Pospisek's Mailing Lists wrote:
>>
>> Before I submitted this, I thought I'd ask for comments, or
>> additional suggestions.
>
> I only comment on the last item, since I don't know OptionParser
> enough. #3 sounds really useful to me.
> *t

Thanks.

I've submitted it now (my first patch to a core lib).  I'm interested
to see what happens.

Tom
This topic is locked and can not be replied to.