summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-19 00:16:08 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-19 00:16:08 +0000
commit6ff1653cf6dc03d9ca5698c2247c8bb50e8bfd95 (patch)
tree47e9ee9ae447b32474010e8eedcc183f98500e0b /doc
parent672da11abfae089bee49ec7f286f2d540edad721 (diff)
* doc/syntax/assignment.rdoc: Improved links
* doc/syntax/methods.rdoc: ditto. * doc/syntax.rdoc: Added link to assignment document git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc')
-rw-r--r--doc/syntax.rdoc3
-rw-r--r--doc/syntax/assignment.rdoc7
-rw-r--r--doc/syntax/methods.rdoc4
3 files changed, 9 insertions, 5 deletions
diff --git a/doc/syntax.rdoc b/doc/syntax.rdoc
index 16f66c16e3..d840d936ed 100644
--- a/doc/syntax.rdoc
+++ b/doc/syntax.rdoc
@@ -5,6 +5,9 @@ The Ruby syntax is large and is split up into the following sections:
Literals[rdoc-ref:syntax/literals.rdoc] ::
Numbers, Strings, Arrays, Hashes, etc.
+Assignment[rdoc-ref:syntax/assignment.rdoc] ::
+ Assignment and variables
+
{Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] ::
+if+, +unless+, +while+, +until+, +for+, +break+, +next+, +redo+
diff --git a/doc/syntax/assignment.rdoc b/doc/syntax/assignment.rdoc
index 8c7fa3a7aa..830ba39ff0 100644
--- a/doc/syntax/assignment.rdoc
+++ b/doc/syntax/assignment.rdoc
@@ -57,7 +57,8 @@ This prints:
You may isolate variables in a block from the outer scope by listing them
following a <code>;</code> in the block's arguments. See the documentation
-for {calling methods}[rdoc-ref:syntax/calling_methods.rdoc] for an example.
+for block local variables in the {calling
+methods}[rdoc-ref:syntax/calling_methods.rdoc] documentation for an example.
See also Kernel#local_variables, but note that a +for+ loop does not create a
new scope like a block does.
@@ -416,8 +417,8 @@ But you may only use one <code>*</code> in an assignment.
== Array Decomposition
-As with {method arguments}[rdoc-ref:syntax/methods.rdoc] you can decompose an
-Array using parenthesis:
+Like Array decomposition in {method arguments}[rdoc-ref:syntax/methods.rdoc]
+you can decompose an Array during assignment using parenthesis:
(a, b) = [1, 2]
diff --git a/doc/syntax/methods.rdoc b/doc/syntax/methods.rdoc
index 5499632f76..7fd69983f3 100644
--- a/doc/syntax/methods.rdoc
+++ b/doc/syntax/methods.rdoc
@@ -409,6 +409,6 @@ May be written as:
end
If you wish to rescue an exception for only part of your method use +begin+ and
-+end+. For more details see the page on {Exception
-Handling}[rdoc-ref:syntax/exceptions.rdoc].
++end+. For more details see the page on {exception
+handling}[rdoc-ref:syntax/exceptions.rdoc].