From 17bc951fc53e51469f39ff78fd40cad50daea278 Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 15 Jan 2013 00:29:56 +0000 Subject: [PATCH] * doc/syntax/calling_methods.rdoc (Receiver): Added :: as pointed out by Tony Arcieri * doc/syntax/calling_methods.rdoc (Block Argument): Fixed { } block examples as pointed out by David Copeland. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ doc/syntax/calling_methods.rdoc | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47c6cd3aff..5dc1a58b55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Jan 15 09:27:56 2013 Eric Hodel + + * doc/syntax/calling_methods.rdoc (Receiver): Added :: as pointed out + by Tony Arcieri + * doc/syntax/calling_methods.rdoc (Block Argument): Fixed { } block + examples as pointed out by David Copeland. + Tue Jan 15 09:10:29 2013 Eric Hodel * doc/syntax/methods.rdoc (Array/Hash Argument): Moved above Keyword diff --git a/doc/syntax/calling_methods.rdoc b/doc/syntax/calling_methods.rdoc index b6c88cd0ee..9b284def61 100644 --- a/doc/syntax/calling_methods.rdoc +++ b/doc/syntax/calling_methods.rdoc @@ -24,6 +24,9 @@ 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 also use :: to designate a receiver, but this is rarely +used due to the potential for confusion with :: for namespaces. + == Positional Arguments The positional arguments for the message follow the method name: @@ -68,13 +71,13 @@ or: my_method { # ... - end + } do end has lower precedence than { } so: method_1 method_2 { # ... - end + } Sends the block to +method_2+ while: