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

ruby-changes:60887

From: Nobuyoshi <ko1@a...>
Date: Fri, 24 Apr 2020 12:22:59 +0900 (JST)
Subject: [ruby-changes:60887] cf90df22c7 (master): [DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=cf90df22c7

From cf90df22c74da2f87421749e8d065cfbd3812afd Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 24 Apr 2020 11:10:44 +0900
Subject: [DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip]


diff --git a/proc.c b/proc.c
index e927469..38d4fc6 100644
--- a/proc.c
+++ b/proc.c
@@ -2271,10 +2271,22 @@ method_clone(VALUE self) https://github.com/ruby/ruby/blob/trunk/proc.c#L2271
  */
 
 
+/*  Document-method: Method#[]
+ *
+ *  call-seq:
+ *     meth[args, ...]         -> obj
+ *
+ *  Invokes the <i>meth</i> with the specified arguments, returning the
+ *  method's return value, like #call.
+ *
+ *     m = 12.method("+")
+ *     m[3]         #=> 15
+ *     m[20]        #=> 32
+ */
+
 /*
  *  call-seq:
  *     meth.call(args, ...)    -> obj
- *     meth[args, ...]         -> obj
  *
  *  Invokes the <i>meth</i> with the specified arguments, returning the
  *  method's return value.
-- 
cgit v0.10.2


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

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