summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2021-04-09 08:21:34 -0500
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-11 08:52:50 +0900
commitc795f30ef00e5d428b4ffaf95e91d61f4a26a505 (patch)
treed287c0292e4a25859a241e648242be09a9e4c4c7 /doc
parent97abd0f6afeeab287b371e9ccc5dd28a33d13a83 (diff)
[ruby/optparse] Reorganize Ruby example files for sharing (#14)
https://github.com/ruby/optparse/commit/9a2352c1c9
Diffstat (limited to 'doc')
-rw-r--r--doc/creates_option.rdoc4
-rw-r--r--doc/option_params.rdoc (renamed from doc/option_params/option_params.rdoc)70
-rw-r--r--doc/option_params/mixed_names.rb12
-rw-r--r--doc/ruby/argument_keywords.rb (renamed from doc/option_params/argument_keywords.rb)0
-rw-r--r--doc/ruby/argument_strings.rb (renamed from doc/option_params/argument_strings.rb)0
-rw-r--r--doc/ruby/argv.rb (renamed from doc/tutorial/argv.rb)0
-rw-r--r--doc/ruby/array.rb (renamed from doc/option_params/array.rb)0
-rw-r--r--doc/ruby/block.rb (renamed from doc/option_params/block.rb)0
-rw-r--r--doc/ruby/date.rb (renamed from doc/option_params/date.rb)0
-rw-r--r--doc/ruby/datetime.rb (renamed from doc/option_params/datetime.rb)0
-rw-r--r--doc/ruby/decimal_integer.rb (renamed from doc/option_params/decimal_integer.rb)0
-rw-r--r--doc/ruby/decimal_numeric.rb (renamed from doc/option_params/decimal_numeric.rb)0
-rw-r--r--doc/ruby/descriptions.rb (renamed from doc/option_params/descriptions.rb)0
-rw-r--r--doc/ruby/explicit_array_values.rb (renamed from doc/option_params/explicit_array_values.rb)0
-rw-r--r--doc/ruby/explicit_hash_values.rb (renamed from doc/option_params/explicit_hash_values.rb)0
-rw-r--r--doc/ruby/false_class.rb (renamed from doc/option_params/false_class.rb)0
-rw-r--r--doc/ruby/float.rb (renamed from doc/option_params/float.rb)0
-rw-r--r--doc/ruby/integer.rb (renamed from doc/option_params/integer.rb)0
-rw-r--r--doc/ruby/long_binary.rb (renamed from doc/option_params/long_binary.rb)0
-rw-r--r--doc/ruby/long_names.rb (renamed from doc/tutorial/long_names.rb)0
-rw-r--r--doc/ruby/long_optional.rb (renamed from doc/option_params/long_optional.rb)0
-rw-r--r--doc/ruby/long_required.rb (renamed from doc/option_params/long_required.rb)0
-rw-r--r--doc/ruby/long_simple.rb (renamed from doc/option_params/long_simple.rb)0
-rw-r--r--doc/ruby/matched_values.rb (renamed from doc/option_params/matched_values.rb)0
-rw-r--r--doc/ruby/method.rb (renamed from doc/option_params/method.rb)0
-rw-r--r--doc/ruby/mixed_names.rb (renamed from doc/tutorial/mixed_names.rb)0
-rw-r--r--doc/ruby/numeric.rb (renamed from doc/option_params/numeric.rb)0
-rw-r--r--doc/ruby/object.rb (renamed from doc/option_params/object.rb)0
-rw-r--r--doc/ruby/octal_integer.rb (renamed from doc/option_params/octal_integer.rb)0
-rw-r--r--doc/ruby/optional_argument.rb (renamed from doc/tutorial/optional_argument.rb)0
-rw-r--r--doc/ruby/proc.rb (renamed from doc/option_params/proc.rb)0
-rw-r--r--doc/ruby/regexp.rb (renamed from doc/option_params/regexp.rb)0
-rw-r--r--doc/ruby/required_argument.rb (renamed from doc/tutorial/required_argument.rb)0
-rw-r--r--doc/ruby/shellwords.rb (renamed from doc/option_params/shellwords.rb)0
-rw-r--r--doc/ruby/short_names.rb (renamed from doc/tutorial/short_names.rb)0
-rw-r--r--doc/ruby/short_optional.rb (renamed from doc/option_params/short_optional.rb)0
-rw-r--r--doc/ruby/short_range.rb (renamed from doc/option_params/short_range.rb)0
-rw-r--r--doc/ruby/short_required.rb (renamed from doc/option_params/short_required.rb)0
-rw-r--r--doc/ruby/short_simple.rb (renamed from doc/option_params/short_simple.rb)0
-rw-r--r--doc/ruby/string.rb (renamed from doc/option_params/string.rb)0
-rw-r--r--doc/ruby/terminator.rb (renamed from doc/option_params/terminator.rb)0
-rw-r--r--doc/ruby/time.rb (renamed from doc/option_params/time.rb)0
-rw-r--r--doc/ruby/true_class.rb (renamed from doc/option_params/true_class.rb)0
-rw-r--r--doc/ruby/uri.rb (renamed from doc/option_params/uri.rb)0
-rw-r--r--doc/tutorial.rdoc (renamed from doc/tutorial/tutorial.rdoc)12
45 files changed, 43 insertions, 55 deletions
diff --git a/doc/creates_option.rdoc b/doc/creates_option.rdoc
index d006706382..af1ac16f2b 100644
--- a/doc/creates_option.rdoc
+++ b/doc/creates_option.rdoc
@@ -1,7 +1,7 @@
Creates an option from the given parameters +params+.
-See {Parameters for New Options}[doc/option_params/option_params_rdoc.html].
+See {Parameters for New Options}[doc/option_params_rdoc.html].
The block, if given, is the handler for the created option.
When the option is encountered during command-line parsing,
the block is called with the argument given for the option, if any.
-See {Option Handlers}[doc/option_params/option_params_rdoc.html#label-Option+Handlers].
+See {Option Handlers}[doc/option_params_rdoc.html#label-Option+Handlers].
diff --git a/doc/option_params/option_params.rdoc b/doc/option_params.rdoc
index ebd08f1fa6..98d9630a38 100644
--- a/doc/option_params/option_params.rdoc
+++ b/doc/option_params.rdoc
@@ -77,7 +77,7 @@ File +short_simple.rb+ defines two options:
- One with short name <tt>-x</tt>.
- The other with two short names, in effect, aliases, <tt>-1</tt> and <tt>-%</tt>.
- :include: short_simple.rb
+ :include: ruby/short_simple.rb
Executions:
@@ -100,7 +100,7 @@ defines an option that requires an argument.
File +short_required.rb+ defines an option <tt>-x</tt>
that requires an argument.
- :include: short_required.rb
+ :include: ruby/short_required.rb
Executions:
@@ -120,7 +120,7 @@ defines an option that allows an optional argument.
File +short_optional.rb+ defines an option <tt>-x</tt>
that allows an optional argument.
- :include: short_optional.rb
+ :include: ruby/short_optional.rb
Executions:
@@ -141,7 +141,7 @@ The parser yields both the actual character cited and the value.
File +short_range.rb+ defines an option with short names
for all printable characters from <tt>!</tt> to <tt>~</tt>:
- :include: short_range.rb
+ :include: ruby/short_range.rb
Executions:
@@ -167,7 +167,7 @@ File +long_simple.rb+ defines two options:
- The other with two long names, in effect, aliases,
<tt>--y1%</tt> and <tt>--z2#</tt>.
- :include: long_simple.rb
+ :include: ruby/long_simple.rb
Executions:
@@ -190,7 +190,7 @@ defines an option that requires an argument.
File +long_required.rb+ defines an option <tt>--xxx</tt>
that requires an argument.
- :include: long_required.rb
+ :include: ruby/long_required.rb
Executions:
@@ -210,7 +210,7 @@ defines an option that allows an optional argument.
File +long_optional.rb+ defines an option <tt>--xxx</tt>
that allows an optional argument.
- :include: long_optional.rb
+ :include: ruby/long_optional.rb
Executions:
@@ -228,7 +228,7 @@ An option may have both short and long names.
File +mixed_names.rb+ defines a mixture of short and long names.
- :include: mixed_names.rb
+ :include: ruby/mixed_names.rb
Executions:
@@ -272,7 +272,7 @@ which is one of <tt>:NONE</tt> (the default),
File +argument_keywords.rb+ defines an option with a required argument.
- :include: argument_keywords.rb
+ :include: ruby/argument_keywords.rb
Executions:
@@ -291,7 +291,7 @@ is to define it in a string separate from the name string.
File +argument_strings.rb+ defines an option with a required argument.
- :include: argument_strings.rb
+ :include: ruby/argument_strings.rb
Executions:
@@ -323,7 +323,7 @@ The argument value must be one of those strings.
File +explicit_array_values.rb+ defines options with explicit argument values.
- :include: explicit_array_values.rb
+ :include: ruby/explicit_array_values.rb
Executions:
@@ -349,7 +349,7 @@ and the value yielded will be the value for that key.
File +explicit_hash_values.rb+ defines options with explicit argument values.
- :include: explicit_hash_values.rb
+ :include: ruby/explicit_hash_values.rb
Executions:
@@ -381,7 +381,7 @@ by specifying a Regexp that the given argument must match.
File +matched_values.rb+ defines options with matched argument values.
- :include: matched_values.rb
+ :include: ruby/matched_values.rb
Executions:
@@ -410,7 +410,7 @@ defines an option whose argument is to be converted to a \Date object.
The argument is converted by method
{Date.parse}[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html#method-c-parse].
- :include: date.rb
+ :include: ruby/date.rb
Executions:
@@ -428,7 +428,7 @@ defines an option whose argument is to be converted to a \DateTime object.
The argument is converted by method
{DateTime.parse}[https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html#method-c-parse].
- :include: datetime.rb
+ :include: ruby/datetime.rb
Executions:
@@ -447,7 +447,7 @@ The argument is converted by method
{Time.httpdate}[https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html#method-c-httpdate] or
{Time.parse}[https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html#method-c-parse].
- :include: time.rb
+ :include: ruby/time.rb
Executions:
@@ -463,7 +463,7 @@ defines an option whose argument is to be converted to a \URI object.
The argument is converted by method
{URI.parse}[https://ruby-doc.org/stdlib-2.7.2/libdoc/uri/rdoc/URI.html#method-c-parse].
- :include: uri.rb
+ :include: ruby/uri.rb
Executions:
@@ -480,7 +480,7 @@ File +shellwords.rb+
defines an option whose argument is to be converted to an \Array object by method
{Shellwords.shellwords}[https://ruby-doc.org/stdlib-2.7.0/libdoc/shellwords/rdoc/Shellwords.html#method-c-shellwords].
- :include: shellwords.rb
+ :include: ruby/shellwords.rb
Executions:
@@ -496,7 +496,7 @@ defines an option whose argument is to be converted to an \Integer object.
The argument is converted by method
{Kernel.Integer}[https://ruby-doc.org/core/Kernel.html#method-i-Integer].
- :include: integer.rb
+ :include: ruby/integer.rb
Executions:
@@ -518,7 +518,7 @@ defines an option whose argument is to be converted to a \Float object.
The argument is converted by method
{Kernel.Float}[https://ruby-doc.org/core/Kernel.html#method-i-Float].
- :include: float.rb
+ :include: ruby/float.rb
Executions:
@@ -541,7 +541,7 @@ The argument is converted by method
{Kernel.Float}[https://ruby-doc.org/core/Kernel.html#method-i-Float], or
{Kernel.Integer}[https://ruby-doc.org/core/Kernel.html#method-i-Integer].
- :include: numeric.rb
+ :include: ruby/numeric.rb
Executions:
@@ -559,7 +559,7 @@ defines an option whose argument is to be converted to an \Integer object.
The argument is converted by method
{Kernel.Integer}[https://ruby-doc.org/core/Kernel.html#method-i-Integer].
- :include: decimal_integer.rb
+ :include: ruby/decimal_integer.rb
The argument may not be in a binary or hexadecimal format;
a leading zero is ignored (not parsed as octal).
@@ -582,7 +582,7 @@ defines an option whose argument is to be converted to an \Integer object.
The argument is converted by method
{Kernel.Integer}[https://ruby-doc.org/core/Kernel.html#method-i-Integer].
- :include: octal_integer.rb
+ :include: ruby/octal_integer.rb
The argument may not be in a binary or hexadecimal format;
it is parsed as octal, regardless of whether it has a leading zero.
@@ -603,7 +603,7 @@ defines an option whose argument is to be converted to an \Integer object.
The argument is converted by method
{Kernel.Integer}[https://ruby-doc.org/core/Kernel.html#method-i-Integer].
- :include: decimal_numeric.rb
+ :include: ruby/decimal_numeric.rb
The argument may not be in a binary or hexadecimal format;
a leading zero causes the argument to be parsed as octal.
@@ -624,7 +624,7 @@ defines an option whose argument is to be converted to +true+ or +false+.
The argument is evaluated by method
{Object#nil?}[https://ruby-doc.org/core-3.0.0/Object.html#method-i-nil-3F].
- :include: true_class.rb
+ :include: ruby/true_class.rb
The argument may be any of those shown in the examples below.
@@ -652,7 +652,7 @@ defines an option whose argument is to be converted to +true+ or +false+.
The argument is evaluated by method
{Object#nil?}[https://ruby-doc.org/core-3.0.0/Object.html#method-i-nil-3F].
- :include: false_class.rb
+ :include: ruby/false_class.rb
The argument may be any of those shown in the examples below.
@@ -678,7 +678,7 @@ Executions:
File +object.rb+
defines an option whose argument is not to be converted from \String.
- :include: object.rb
+ :include: ruby/object.rb
Executions:
@@ -692,7 +692,7 @@ Executions:
File +string.rb+
defines an option whose argument is not to be converted from \String.
- :include: string.rb
+ :include: ruby/string.rb
Executions:
@@ -707,7 +707,7 @@ File +array.rb+
defines an option whose argument is to be converted from \String
to an array of strings, based on comma-separated substrings.
- :include: array.rb
+ :include: ruby/array.rb
Executions:
@@ -723,7 +723,7 @@ Executions:
File +regexp.rb+
defines an option whose argument is to be converted to a \Regexp object.
- :include: regexp.rb
+ :include: ruby/regexp.rb
Executions:
@@ -744,7 +744,7 @@ File +descriptions.rb+ has six strings in its array +descriptions+.
These are all passed as parameters to OptionParser#on, so that they
all, line for line, become the option's description.
- :include: descriptions.rb
+ :include: ruby/descriptions.rb
Executions:
@@ -774,7 +774,7 @@ An option hadler may be a block.
File +block.rb+ defines an option that has a handler block.
- :include: block.rb
+ :include: ruby/block.rb
Executions:
@@ -793,7 +793,7 @@ An option handler may be a Proc.
File +proc.rb+ defines an option that has a handler proc.
- :include: proc.rb
+ :include: ruby/proc.rb
Executions:
@@ -812,7 +812,7 @@ An option handler may be a Method.
File +proc.rb+ defines an option that has a handler method.
- :include: method.rb
+ :include: ruby/method.rb
Executions:
@@ -833,7 +833,7 @@ This can be useful if there are options not meant for the current program.
File +terminator.rb+ defines one option <tt>--my_option</tt>.
- :include: terminator.rb
+ :include: ruby/terminator.rb
The first execution fails because <tt>--nosuch</tt> is not a defined option;
the second succeeds because <tt>--</tt> causes that option to be ignored:
diff --git a/doc/option_params/mixed_names.rb b/doc/option_params/mixed_names.rb
deleted file mode 100644
index fe6c554bdc..0000000000
--- a/doc/option_params/mixed_names.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'optparse'
-parser = OptionParser.new
-parser.on('-x', '--xxx', 'Short and long, simple') do |value|
- p ['--xxx', value]
-end
-parser.on('-yYYY', '--yyy', 'Short and long, required argument') do |value|
- p ['--yyy', value]
-end
-parser.on('-z [ZZZ]', '--zzz', 'Short and long, optional argument') do |value|
- p ['--zzz', value]
-end
-parser.parse!
diff --git a/doc/option_params/argument_keywords.rb b/doc/ruby/argument_keywords.rb
index 8533257c67..8533257c67 100644
--- a/doc/option_params/argument_keywords.rb
+++ b/doc/ruby/argument_keywords.rb
diff --git a/doc/option_params/argument_strings.rb b/doc/ruby/argument_strings.rb
index 77861dda30..77861dda30 100644
--- a/doc/option_params/argument_strings.rb
+++ b/doc/ruby/argument_strings.rb
diff --git a/doc/tutorial/argv.rb b/doc/ruby/argv.rb
index 12495cfa1f..12495cfa1f 100644
--- a/doc/tutorial/argv.rb
+++ b/doc/ruby/argv.rb
diff --git a/doc/option_params/array.rb b/doc/ruby/array.rb
index 7c6c14fad4..7c6c14fad4 100644
--- a/doc/option_params/array.rb
+++ b/doc/ruby/array.rb
diff --git a/doc/option_params/block.rb b/doc/ruby/block.rb
index c4dfdeb31e..c4dfdeb31e 100644
--- a/doc/option_params/block.rb
+++ b/doc/ruby/block.rb
diff --git a/doc/option_params/date.rb b/doc/ruby/date.rb
index 5994ad6a85..5994ad6a85 100644
--- a/doc/option_params/date.rb
+++ b/doc/ruby/date.rb
diff --git a/doc/option_params/datetime.rb b/doc/ruby/datetime.rb
index b9b591d5f6..b9b591d5f6 100644
--- a/doc/option_params/datetime.rb
+++ b/doc/ruby/datetime.rb
diff --git a/doc/option_params/decimal_integer.rb b/doc/ruby/decimal_integer.rb
index 360bd284f8..360bd284f8 100644
--- a/doc/option_params/decimal_integer.rb
+++ b/doc/ruby/decimal_integer.rb
diff --git a/doc/option_params/decimal_numeric.rb b/doc/ruby/decimal_numeric.rb
index 954da13561..954da13561 100644
--- a/doc/option_params/decimal_numeric.rb
+++ b/doc/ruby/decimal_numeric.rb
diff --git a/doc/option_params/descriptions.rb b/doc/ruby/descriptions.rb
index 9aec80aae2..9aec80aae2 100644
--- a/doc/option_params/descriptions.rb
+++ b/doc/ruby/descriptions.rb
diff --git a/doc/option_params/explicit_array_values.rb b/doc/ruby/explicit_array_values.rb
index 64f930a4bc..64f930a4bc 100644
--- a/doc/option_params/explicit_array_values.rb
+++ b/doc/ruby/explicit_array_values.rb
diff --git a/doc/option_params/explicit_hash_values.rb b/doc/ruby/explicit_hash_values.rb
index 9c9e6a48ed..9c9e6a48ed 100644
--- a/doc/option_params/explicit_hash_values.rb
+++ b/doc/ruby/explicit_hash_values.rb
diff --git a/doc/option_params/false_class.rb b/doc/ruby/false_class.rb
index 04fe335ede..04fe335ede 100644
--- a/doc/option_params/false_class.rb
+++ b/doc/ruby/false_class.rb
diff --git a/doc/option_params/float.rb b/doc/ruby/float.rb
index 390df7f7bd..390df7f7bd 100644
--- a/doc/option_params/float.rb
+++ b/doc/ruby/float.rb
diff --git a/doc/option_params/integer.rb b/doc/ruby/integer.rb
index f10656ff1a..f10656ff1a 100644
--- a/doc/option_params/integer.rb
+++ b/doc/ruby/integer.rb
diff --git a/doc/option_params/long_binary.rb b/doc/ruby/long_binary.rb
index 8eccecaf3a..8eccecaf3a 100644
--- a/doc/option_params/long_binary.rb
+++ b/doc/ruby/long_binary.rb
diff --git a/doc/tutorial/long_names.rb b/doc/ruby/long_names.rb
index a34b3382c2..a34b3382c2 100644
--- a/doc/tutorial/long_names.rb
+++ b/doc/ruby/long_names.rb
diff --git a/doc/option_params/long_optional.rb b/doc/ruby/long_optional.rb
index 38dd82166b..38dd82166b 100644
--- a/doc/option_params/long_optional.rb
+++ b/doc/ruby/long_optional.rb
diff --git a/doc/option_params/long_required.rb b/doc/ruby/long_required.rb
index b76c997339..b76c997339 100644
--- a/doc/option_params/long_required.rb
+++ b/doc/ruby/long_required.rb
diff --git a/doc/option_params/long_simple.rb b/doc/ruby/long_simple.rb
index 4e489c43ed..4e489c43ed 100644
--- a/doc/option_params/long_simple.rb
+++ b/doc/ruby/long_simple.rb
diff --git a/doc/option_params/matched_values.rb b/doc/ruby/matched_values.rb
index f184ca8474..f184ca8474 100644
--- a/doc/option_params/matched_values.rb
+++ b/doc/ruby/matched_values.rb
diff --git a/doc/option_params/method.rb b/doc/ruby/method.rb
index 3f02ff5798..3f02ff5798 100644
--- a/doc/option_params/method.rb
+++ b/doc/ruby/method.rb
diff --git a/doc/tutorial/mixed_names.rb b/doc/ruby/mixed_names.rb
index e886049821..e886049821 100644
--- a/doc/tutorial/mixed_names.rb
+++ b/doc/ruby/mixed_names.rb
diff --git a/doc/option_params/numeric.rb b/doc/ruby/numeric.rb
index d7021f154a..d7021f154a 100644
--- a/doc/option_params/numeric.rb
+++ b/doc/ruby/numeric.rb
diff --git a/doc/option_params/object.rb b/doc/ruby/object.rb
index 0f5ae8b922..0f5ae8b922 100644
--- a/doc/option_params/object.rb
+++ b/doc/ruby/object.rb
diff --git a/doc/option_params/octal_integer.rb b/doc/ruby/octal_integer.rb
index b9644a076b..b9644a076b 100644
--- a/doc/option_params/octal_integer.rb
+++ b/doc/ruby/octal_integer.rb
diff --git a/doc/tutorial/optional_argument.rb b/doc/ruby/optional_argument.rb
index ebff2f466d..ebff2f466d 100644
--- a/doc/tutorial/optional_argument.rb
+++ b/doc/ruby/optional_argument.rb
diff --git a/doc/option_params/proc.rb b/doc/ruby/proc.rb
index 9c669fdc92..9c669fdc92 100644
--- a/doc/option_params/proc.rb
+++ b/doc/ruby/proc.rb
diff --git a/doc/option_params/regexp.rb b/doc/ruby/regexp.rb
index 6aba45ce76..6aba45ce76 100644
--- a/doc/option_params/regexp.rb
+++ b/doc/ruby/regexp.rb
diff --git a/doc/tutorial/required_argument.rb b/doc/ruby/required_argument.rb
index 7a5a868265..7a5a868265 100644
--- a/doc/tutorial/required_argument.rb
+++ b/doc/ruby/required_argument.rb
diff --git a/doc/option_params/shellwords.rb b/doc/ruby/shellwords.rb
index d181d4a4f6..d181d4a4f6 100644
--- a/doc/option_params/shellwords.rb
+++ b/doc/ruby/shellwords.rb
diff --git a/doc/tutorial/short_names.rb b/doc/ruby/short_names.rb
index 6581dfe19a..6581dfe19a 100644
--- a/doc/tutorial/short_names.rb
+++ b/doc/ruby/short_names.rb
diff --git a/doc/option_params/short_optional.rb b/doc/ruby/short_optional.rb
index 6eebf01c5f..6eebf01c5f 100644
--- a/doc/option_params/short_optional.rb
+++ b/doc/ruby/short_optional.rb
diff --git a/doc/option_params/short_range.rb b/doc/ruby/short_range.rb
index f5b870a4bd..f5b870a4bd 100644
--- a/doc/option_params/short_range.rb
+++ b/doc/ruby/short_range.rb
diff --git a/doc/option_params/short_required.rb b/doc/ruby/short_required.rb
index 867c02c9f5..867c02c9f5 100644
--- a/doc/option_params/short_required.rb
+++ b/doc/ruby/short_required.rb
diff --git a/doc/option_params/short_simple.rb b/doc/ruby/short_simple.rb
index d3d489e2dc..d3d489e2dc 100644
--- a/doc/option_params/short_simple.rb
+++ b/doc/ruby/short_simple.rb
diff --git a/doc/option_params/string.rb b/doc/ruby/string.rb
index fee84a17ea..fee84a17ea 100644
--- a/doc/option_params/string.rb
+++ b/doc/ruby/string.rb
diff --git a/doc/option_params/terminator.rb b/doc/ruby/terminator.rb
index c718ac1a97..c718ac1a97 100644
--- a/doc/option_params/terminator.rb
+++ b/doc/ruby/terminator.rb
diff --git a/doc/option_params/time.rb b/doc/ruby/time.rb
index aa8b0cfa16..aa8b0cfa16 100644
--- a/doc/option_params/time.rb
+++ b/doc/ruby/time.rb
diff --git a/doc/option_params/true_class.rb b/doc/ruby/true_class.rb
index 40db9d07c5..40db9d07c5 100644
--- a/doc/option_params/true_class.rb
+++ b/doc/ruby/true_class.rb
diff --git a/doc/option_params/uri.rb b/doc/ruby/uri.rb
index b492835b4f..b492835b4f 100644
--- a/doc/option_params/uri.rb
+++ b/doc/ruby/uri.rb
diff --git a/doc/tutorial/tutorial.rdoc b/doc/tutorial.rdoc
index 60ead0a6c6..5e95f20fae 100644
--- a/doc/tutorial/tutorial.rdoc
+++ b/doc/tutorial.rdoc
@@ -6,7 +6,7 @@ When a Ruby program executes, it captures its command-line arguments
and options into variable ARGV.
This simple program just prints its \ARGV:
- :include: argv.rb
+ :include: ruby/argv.rb
Execution, with arguments and options:
@@ -67,7 +67,7 @@ File +short_names.rb+
defines an option with a short name, <tt>-x</tt>,
and an option with two short names (aliases, in effect) <tt>-y</tt> and <tt>-z</tt>.
- :include: short_names.rb
+ :include: ruby/short_names.rb
Executions:
@@ -99,7 +99,7 @@ File +long_names.rb+
defines an option with a long name, <tt>--xxx</tt>,
and an option with two long names (aliases, in effect) <tt>--y1%</tt> and <tt>--z2#</tt>.
- :include: long_names.rb
+ :include: ruby/long_names.rb
Executions:
@@ -118,7 +118,7 @@ so that a short name is in effect an abbreviation of a long name.
File +mixed_names.rb+
defines options that each have both a short and a long name.
- :include: mixed_names.rb
+ :include: ruby/mixed_names.rb
Executions:
@@ -147,7 +147,7 @@ to its name definition.
File +required_argument.rb+ defines two options;
each has a required argument because the name definition has a following dummy word.
- :include: required_argument.rb
+ :include: ruby/required_argument.rb
When an option is found, the given argument is yielded.
@@ -172,7 +172,7 @@ File +optional_argument.rb+ defines two options;
each has an optional argument because the name definition has a following dummy word
in square brackets.
- :include: optional_argument.rb
+ :include: ruby/optional_argument.rb
When an option with an argument is found, the given argument yielded.