# OptionParser patch

**URL:** <https://www.ruby-forum.com/t/optionparser-patch/88344>\
**Category:** Ruby\
**Created:** [March 9, 2007, 9:49pm UTC](https://www.ruby-forum.com/t/optionparser-patch/88344 "2007-03-09T21:49:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![twp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c89c15/32.png) [@twp](https://www.ruby-forum.com/u/twp)\
**Post date:** [March 9, 2007, 9:49pm UTC](https://www.ruby-forum.com/t/optionparser-patch/88344/1 "2007-03-09T21:49:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![twp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c89c15/32.png) [@twp](https://www.ruby-forum.com/u/twp)\
**Post date:** [March 9, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/optionparser-patch/88344/2 "2007-03-09T23:25:25Z")

</div>

On Sat, 10 Mar 2007, Tom P. 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

–

---

<div class="post-metadata">

**Author:** ![twp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c89c15/32.png) [@twp](https://www.ruby-forum.com/u/twp)\
**Post date:** [March 12, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/optionparser-patch/88344/3 "2007-03-12T15:03:43Z")

</div>

On Mar 9, 2007, at 5:25 PM, Tomas P.'s Mailing L. 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
