diff options
Diffstat (limited to 'doc/syntax/calling_methods.rdoc')
-rw-r--r-- | doc/syntax/calling_methods.rdoc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/syntax/calling_methods.rdoc b/doc/syntax/calling_methods.rdoc index 9cec4526b8..db0217cfef 100644 --- a/doc/syntax/calling_methods.rdoc +++ b/doc/syntax/calling_methods.rdoc @@ -27,6 +27,10 @@ This sends the +my_method+ message to +my_object+. Any object can be a receiver but depending on the method's visibility sending a message may raise a NoMethodError. +You may use <code>.?</code> to designate a receiver, then +my_method+ is not +invoked and the result is +nil+ when the receiver is +nil+. In that case, the +argument of +my_method+ are not evaluated. + You may also use <code>::</code> to designate a receiver, but this is rarely used due to the potential for confusion with <code>::</code> for namespaces. |