summaryrefslogtreecommitdiff
path: root/doc/optparse/ruby
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2021-04-22 07:27:06 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-07-28 20:13:39 +0900
commit27679b349e453b5ab1ce31472389bcb7ce550e4e (patch)
tree50893f3ef721e47402f7265c5be7f45d3f00e3e5 /doc/optparse/ruby
parenta10db32003320a81c32a3733d9d97ba6e3614efa (diff)
[ruby/optparse] More on tutorial (https://github.com/ruby/optparse/pull/23)
- Removed a largish block of repeated text. - Added sections "Top List and Base List" and "Methods for Defining Options" (on, define, etc.). - Linked from class OptionParser doc to the tutorial. https://github.com/ruby/optparse/commit/7f3195b9db
Diffstat (limited to 'doc/optparse/ruby')
-rw-r--r--doc/optparse/ruby/basic.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/optparse/ruby/basic.rb b/doc/optparse/ruby/basic.rb
index 617d337427..91d37627c0 100644
--- a/doc/optparse/ruby/basic.rb
+++ b/doc/optparse/ruby/basic.rb
@@ -12,5 +12,6 @@ end
parser.on('-z', 'Whether to Z') do |value|
p ['z', value]
end
-# Parse the command line.
-parser.parse!
+# Parse the command line and return pared-down ARGV.
+p parser.parse!
+