From 46eed7b80bc77f3134b83233e0a5e71d7da2baa7 Mon Sep 17 00:00:00 2001 From: stomar Date: Wed, 29 Mar 2017 19:12:01 +0000 Subject: methods.rdoc: small improvements * doc/syntax/methods.rdoc: [DOC] small improvements: fix some typos, grammar, punctuation, consistently use capitalized "Ruby". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- doc/syntax/methods.rdoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/syntax/methods.rdoc') diff --git a/doc/syntax/methods.rdoc b/doc/syntax/methods.rdoc index d41c6fcba5..bdc555b131 100644 --- a/doc/syntax/methods.rdoc +++ b/doc/syntax/methods.rdoc @@ -31,7 +31,7 @@ indicates an extended character. Ruby allows method names and other identifiers to contain such characters. Ruby programs cannot contain some characters like ASCII NUL (\x00). -The following are the examples of valid ruby methods: +The following are examples of valid Ruby methods: def hello "hello" @@ -45,18 +45,18 @@ Typically method names are US-ASCII compatible since the keys to type them exist on all keyboards. Method names may end with a ! (bang or exclamation mark), a -? (question mark) or = equals sign. +? (question mark), or = (equals sign). -The bang methods (! at the end of method name) are called and +The bang methods (! at the end of the method name) are called and 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 +exclamation point or bang is considered dangerous. In Ruby's core library the dangerous method implies that when a method ends with a bang (!), 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, the Ruby core library will have a non-bang counterpart (method name which does NOT end with !) of every bang method (method name which does end with !) 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. +the receiver. This convention is typically true for the 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 return an @@ -66,8 +66,8 @@ Methods that end with an equals sign indicate an assignment method. For 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 -operators accept only one argument. Following the operator is the typical +These are method names for the various Ruby operators. Each of these +operators accepts only one argument. Following the operator is the typical use or name of the operator. Creating an alternate meaning for the operator may lead to confusion as the user expects plus to add things, minus to subtract things, etc. Additionally, you cannot alter the precedence of the -- cgit v1.2.3