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

ruby-changes:59884

From: Florian <ko1@a...>
Date: Fri, 31 Jan 2020 05:35:45 +0900 (JST)
Subject: [ruby-changes:59884] 39a1959d28 (master): Fix wrong return value in proc documentation.

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

From 39a1959d289ecba5e61431deaef239123c3f0fcc Mon Sep 17 00:00:00 2001
From: Florian Heinle <florian.heinle@x...>
Date: Thu, 30 Jan 2020 12:45:21 +0100
Subject: Fix wrong return value in proc documentation.


diff --git a/proc.c b/proc.c
index 01efab7..47f4e66 100644
--- a/proc.c
+++ b/proc.c
@@ -3759,7 +3759,7 @@ proc_ruby2_keywords(VALUE procval) https://github.com/ruby/ruby/blob/trunk/proc.c#L3759
  *
  *      p = proc {|x, y| x }
  *      l = lambda {|x, y| x }
- *      [[1, 2], [3, 4]].map(&p) #=> [1, 2]
+ *      [[1, 2], [3, 4]].map(&p) #=> [1, 3]
  *      [[1, 2], [3, 4]].map(&l) # ArgumentError: wrong number of arguments (given 1, expected 2)
  *
  * The only exception is dynamic method definition: even if defined by
-- 
cgit v0.10.2


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

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