Skip to content

Commit

Permalink
* doc/syntax/calling_methods.rdoc (Receiver): Added :: as pointed out
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
drbrain committed Jan 15, 2013
1 parent eeee190 commit 17bc951
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Tue Jan 15 09:27:56 2013 Eric Hodel <[email protected]>

* 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 <[email protected]>

* doc/syntax/methods.rdoc (Array/Hash Argument): Moved above Keyword
Expand Down
7 changes: 5 additions & 2 deletions doc/syntax/calling_methods.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>::</code> to designate a receiver, but this is rarely
used due to the potential for confusion with <code>::</code> for namespaces.

== Positional Arguments

The positional arguments for the message follow the method name:
Expand Down Expand Up @@ -68,13 +71,13 @@ or:

my_method {
# ...
end
}

<code>do end</code> has lower precedence than <code>{ }</code> so:

method_1 method_2 {
# ...
end
}

Sends the block to +method_2+ while:

Expand Down

0 comments on commit 17bc951

Please sign in to comment.