Skip to content

Commit

Permalink
* doc/syntax/assignment.rdoc: Improved links
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
drbrain committed Jan 19, 2013
1 parent 672da11 commit 6ff1653
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Sat Jan 19 09:15:58 2013 Eric Hodel <[email protected]>

* doc/syntax/assignment.rdoc: Improved links
* doc/syntax/methods.rdoc: ditto.

* doc/syntax.rdoc: Added link to assignment document

Sat Jan 19 08:47:33 2013 Eric Hodel <[email protected]>

* doc/syntax/assignment.rdoc: Added a syntax document on assignment.
Expand Down
3 changes: 3 additions & 0 deletions doc/syntax.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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+

Expand Down
7 changes: 4 additions & 3 deletions doc/syntax/assignment.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions doc/syntax/methods.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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].

0 comments on commit 6ff1653

Please sign in to comment.