Project

General

Profile

Actions

Bug #1128

closed

OptParse outputs a misleading display

Bug #1128: OptParse outputs a misleading display

Added by rogerdpack (Roger Pack) over 16 years ago. Updated over 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.0 (2008-11-15 revision 20237) [i386-mingw32]
Backport:
[ruby-core:21912]

Description

=begin
as discussed
http://www.ruby-forum.com/topic/177288#new

require 'optparse' ; OptionParser.new do |o|
o.on('-p', '--123456789012345678901234567890=NAME',
'multiples variant ex: ') {}
end.parse(['-h'])

Usage: irb [options]
-p=NAME
--123456789012345678901234567890
multiples variant ex:

"When short + long + value + description are too long to hold on a single
line, optionparser tries to present it better, and it shows the bug."
i.e. it shouldn't show -p=NAME and it should be -pNAME.
Thanks!
-=r
=end

Actions

Also available in: PDF Atom