aboutsummaryrefslogtreecommitdiffstats
path: root/doc/syntax/methods.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/syntax/methods.rdoc')
-rw-r--r--doc/syntax/methods.rdoc13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/syntax/methods.rdoc b/doc/syntax/methods.rdoc
index c8fc584c68..0ee2a08367 100644
--- a/doc/syntax/methods.rdoc
+++ b/doc/syntax/methods.rdoc
@@ -52,18 +52,18 @@ executed just like any other method. However, by convention, a method with an
exclamation point or bang is considered dangerous. In ruby core library the
dangerous method implies that when a method ends with a bang (<code>!</code>),
it indicates that unlike its non-bang equivalent, permanently modifies its
-receiver. Almost always, Ruby core library will have a non-bang
+receiver. Almost always, ruby core library will have a non-bang
counterpart (method name which does NOT end with <code>!</code>) of every bang
method (method name which does end with <code>!</code>) that does not modify
the receiver. This convention is typically true for ruby core library but
may or may not hold true for other ruby libraries.
-Methods that end with a question mark by convention return boolean. But they
-may not always return just +true+ or +false+. Often they will may return an
+Methods that end with a question mark by convention return boolean, but they
+may not always return just +true+ or +false+. Often, they will return an
object to indicate a true value (or "truthy" value).
Methods that end with an equals sign indicate an assignment method. For
-assignment methods the return value is ignored, the arguments are returned
+assignment methods, the return value is ignored and the arguments are returned
instead.
These are method names for the various ruby operators. Each of these
@@ -148,7 +148,7 @@ evaluated.
end
Note that for assignment methods the return value will always be ignored.
-Instead the argument will be returned:
+Instead, the argument will be returned:
def a=(value)
return 1 + value
@@ -450,7 +450,6 @@ May be written as:
# handle exception
end
-If you wish to rescue an exception for only part of your method use +begin+ and
+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].
-