[前][次][番号順一覧][スレッド一覧]

ruby-changes:26766

From: drbrain <ko1@a...>
Date: Tue, 15 Jan 2013 09:30:30 +0900 (JST)
Subject: [ruby-changes:26766] drbrain:r38818 (trunk): * doc/syntax/calling_methods.rdoc (Receiver): Added :: as pointed out

drbrain	2013-01-15 09:29:56 +0900 (Tue, 15 Jan 2013)

  New Revision: 38818

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38818

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/doc/syntax/calling_methods.rdoc

Index: doc/syntax/calling_methods.rdoc
===================================================================
--- doc/syntax/calling_methods.rdoc	(revision 38817)
+++ doc/syntax/calling_methods.rdoc	(revision 38818)
@@ -24,6 +24,9 @@ This sends the +my_method+ message to +m https://github.com/ruby/ruby/blob/trunk/doc/syntax/calling_methods.rdoc#L24
 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:
@@ -68,13 +71,13 @@ or: https://github.com/ruby/ruby/blob/trunk/doc/syntax/calling_methods.rdoc#L71
 
   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:
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38817)
+++ ChangeLog	(revision 38818)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jan 15 09:27:56 2013  Eric Hodel  <drbrain@s...>
+
+	* 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  <drbrain@s...>
 
 	* doc/syntax/methods.rdoc (Array/Hash Argument):  Moved above Keyword

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]