From: "F. Senault" Date: 2009-02-01T08:40:07+09:00 Subject: Re: OptParse bug? Le 31 janvier 2009 � 23:55, Joel VanderWerf a �crit : > What is causing the difference between typical output and this case? Do > you see the "-p --long=NAME" variant for other options in the same > program? Looking at comparable output in my own use of optparse, the > format tends to look like this: > > -r, --read-options [FILE] Read options from file [stdin] It seems to be the length of the option name : 0:33 fred@ardberg:/data/ruby/blackops% irb >> require 'optparse' ; OptionParser.new do |o| ?> o.on('-p', '--12345678901234567890=NAME', ?> 'multiples variant ex: ') {} >> end.parse(['-h']) Usage: irb [options] -p, --12345678901234567890=NAME multiples variant ex: >> 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. Fred -- When you're brought into this world They say you're born in sin Well at least they gave me something I didn't have to steal or have to win Well they tell me that I'm wanted Yeah, I'm a wanted man (Bon Jovi, Blaze of Glory)