diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-06 06:16:35 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-06 06:16:35 +0000 |
commit | bfce381eb7e4f7140c99b2ce5fd05fbb9452bebb (patch) | |
tree | 9fae944f3a065efd74a3196ce4a8a5af21a545c2 | |
parent | 31fa4d889938fbb53c40fee4b2ed1dcaee2f617e (diff) | |
download | ruby-bfce381eb7e4f7140c99b2ce5fd05fbb9452bebb.tar.gz |
* doc/syntax/assignment.rdoc: [DOC] Fix assignment directions [ci skip]
By @idupree [Fixes GH-555] https://github.com/ruby/ruby/pull/555
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/syntax/assignment.rdoc | 10 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Thu Mar 6 15:15:24 2014 Zachary Scott <e@zzak.io> + + * doc/syntax/assignment.rdoc: [DOC] Fix assignment directions + By @idupree [Fixes GH-555] https://github.com/ruby/ruby/pull/555 + Thu Mar 6 15:07:18 2014 Zachary Scott <e@zzak.io> * doc/syntax/methods.rdoc: [DOC] Fix example for block arguments diff --git a/doc/syntax/assignment.rdoc b/doc/syntax/assignment.rdoc index 7424d4885f..79fe680f3b 100644 --- a/doc/syntax/assignment.rdoc +++ b/doc/syntax/assignment.rdoc @@ -374,7 +374,7 @@ assigning. This is similar to multiple assignment: p a # prints [1, 2, 3] -You can splat anywhere in the left-hand side of the assignment: +You can splat anywhere in the right-hand side of the assignment: a = 1, *[2, 3] @@ -382,7 +382,7 @@ You can splat anywhere in the left-hand side of the assignment: == Multiple Assignment -You can assign multiple values on the left-hand side to multiple variables: +You can assign multiple values on the right-hand side to multiple variables: a, b = 1, 2 @@ -408,8 +408,8 @@ You can use multiple assignment to swap two values in-place: p new_value: new_value, old_value: old_value # prints {:new_value=>1, :old_value=>2} -If you have more values on the left hand side of the assignment than variables -on the right hand side the extra values are ignored: +If you have more values on the right hand side of the assignment than variables +on the left hand side the extra values are ignored: a, b = 1, 2, 3 @@ -422,7 +422,7 @@ the assignment. p a: a, b: b # prints {:a=>1, :b=>[2, 3]} -The <code>*</code> can appear anywhere on the right-hand side: +The <code>*</code> can appear anywhere on the left-hand side: *a, b = 1, 2, 3 |