summaryrefslogtreecommitdiff
path: root/doc/syntax/miscellaneous.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/miscellaneous.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/miscellaneous.rdoc')
-rw-r--r--doc/syntax/miscellaneous.rdoc11
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/syntax/miscellaneous.rdoc b/doc/syntax/miscellaneous.rdoc
index 8f424f019f..d5691f8d60 100644
--- a/doc/syntax/miscellaneous.rdoc
+++ b/doc/syntax/miscellaneous.rdoc
@@ -10,16 +10,16 @@ most frequently used with <code>ruby -e</code>.
== Indentation
-Ruby does not require any indentation. Typically ruby programs are indented
+Ruby does not require any indentation. Typically, ruby programs are indented
two spaces.
-If you run ruby with warnings enabled and have an indentation mis-match you
+If you run ruby with warnings enabled and have an indentation mis-match, you
will receive a warning.
== +alias+
The +alias+ keyword is most frequently used to alias methods. When aliasing a
-method you can use either its name or a symbol:
+method, you can use either its name or a symbol:
alias new_name old_name
alias :new_name :old_name
@@ -61,7 +61,7 @@ You may use +undef+ in any scope. See also Module#undef_method
p defined?(RUBY_VERSION) # prints "constant"
p defined?(1 + 1) # prints "method"
-You don't need to use parenthesis with +defined?+ but they are recommended due
+You don't need to use parenthesis with +defined?+, but they are recommended due
to the {low precedence}[rdoc-ref:syntax/precedence.rdoc] of +defined?+.
For example, if you wish to check if an instance variable exists and that the
@@ -69,7 +69,7 @@ instance variable is zero:
defined? @instance_variable && @instance_variable.zero?
-This returns <code>"expression"</code> which is not what you want if the
+This returns <code>"expression"</code>, which is not what you want if the
instance variable is not defined.
@instance_variable = 1
@@ -104,4 +104,3 @@ Here is an example one-liner that adds numbers from standard input or any files
in the argument list:
ruby -ne 'BEGIN { count = 0 }; END { puts count }; count += gets.to_i'
-