diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-18 22:17:06 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-18 22:18:52 +0900 |
commit | 9cb809cfefafc58cc0bf56184ecc94aec3c41c1d (patch) | |
tree | 71d9416c94847d2a366a5886d3b0a94f1bcd11bc /NEWS | |
parent | 58e2ca31dbbae9bb54917c9b3cc88fc138454eeb (diff) | |
download | bundler-9cb809cfefafc58cc0bf56184ecc94aec3c41c1d.tar.gz |
Verbatim texts need more indent [ci skip]
And separate ruby script and executed example.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 28 |
1 files changed, 16 insertions, 12 deletions
@@ -405,18 +405,22 @@ OptionParser:: * Now show "Did you mean?" for unknown option. [Feature #16256] - require 'optparse' - OptionParser.new do |opts| - opts.on("-f", "--foo", "foo") {|v| } - opts.on("-b", "--bar", "bar") {|v| } - opts.on("-c", "--baz", "baz") {|v| } - end.parse! - - $ ruby test.rb --baa - Traceback (most recent call last): - test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption) - Did you mean? baz - bar + test.rb: + + require 'optparse' + OptionParser.new do |opts| + opts.on("-f", "--foo", "foo") {|v| } + opts.on("-b", "--bar", "bar") {|v| } + opts.on("-c", "--baz", "baz") {|v| } + end.parse! + + example: + + $ ruby test.rb --baa + Traceback (most recent call last): + test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption) + Did you mean? baz + bar Pathname:: |