summaryrefslogtreecommitdiff
path: root/doc/syntax/assignment.rdoc
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-18 03:39:49 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-18 03:39:49 +0000
commit4f94cb43fcf7035e7ee1db0ba6750d3249567085 (patch)
tree8dea211a4bc465a4936d38f74507edce2d8bdc7b /doc/syntax/assignment.rdoc
parentb7d153699153629f037a059b930d8e928c42a4a1 (diff)
* doc/syntax/*.rdoc: separated modifier at sentence.
[ci skip][fix GH-1121] Patch by @clandry94 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/syntax/assignment.rdoc')
-rw-r--r--doc/syntax/assignment.rdoc9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/syntax/assignment.rdoc b/doc/syntax/assignment.rdoc
index adfe6485a4..83300cbece 100644
--- a/doc/syntax/assignment.rdoc
+++ b/doc/syntax/assignment.rdoc
@@ -1,6 +1,6 @@
= Assignment
-In Ruby assignment uses the <code>=</code> (equals sign) character. This
+In Ruby, assignment uses the <code>=</code> (equals sign) character. This
example assigns the number five to the local variable +v+:
v = 5
@@ -137,7 +137,7 @@ Here is an example of instance variable usage:
p object2.value # prints "other value"
An uninitialized instance variable has a value of +nil+. If you run Ruby with
-warnings enabled you will get a warning when accessing an uninitialized
+warnings enabled, you will get a warning when accessing an uninitialized
instance variable.
The +value+ method has access to the value set by the +initialize+ method, but
@@ -279,7 +279,7 @@ to an instance variable most people use Module#attr_accessor:
end
When using method assignment you must always have a receiver. If you do not
-have a receiver Ruby assumes you are assigning to a local variable:
+have a receiver, Ruby assumes you are assigning to a local variable:
class C
attr_accessor :value
@@ -409,7 +409,7 @@ You can use multiple assignment to swap two values in-place:
# prints {:new_value=>1, :old_value=>2}
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:
+on the left hand side, the extra values are ignored:
a, b = 1, 2, 3
@@ -452,4 +452,3 @@ Since each decomposition is considered its own multiple assignment you can use
p a: a, b: b, c: c, d: d
# prints {:a=>1, :b=>2, :c=>[3, 4], :d=>[5, 6]}
-