diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-18 03:39:49 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-18 03:39:49 +0000 |
commit | 4f94cb43fcf7035e7ee1db0ba6750d3249567085 (patch) | |
tree | 8dea211a4bc465a4936d38f74507edce2d8bdc7b /doc/syntax/methods.rdoc | |
parent | b7d153699153629f037a059b930d8e928c42a4a1 (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/methods.rdoc')
-rw-r--r-- | doc/syntax/methods.rdoc | 13 |
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]. - |