[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66063] [ruby-trunk - misc #10469] [Open] Documented return value for Array#each
From:
jared@...
Date:
2014-11-03 06:51:09 UTC
List:
ruby-core #66063
Issue #10469 has been reported by Jared Beck.
----------------------------------------
misc #10469: Documented return value for Array#each
https://bugs.ruby-lang.org/issues/10469
* Author: Jared Beck
* Status: Open
* Priority: Low
* Assignee: Zachary Scott
* Category: doc
* Target version: next minor
----------------------------------------
This is a minor documentation suggestion.
When given a block, `Array#each` returns `self`.
[1,2,3].each { |x| 'banana' }
#=3D> [1, 2, 3]
However, this is not obvious (to me) from the documentation.
The documented method signature is `each { |item| block } =E2=86=92 ary`. =
Perhaps most people would understand that `ary` is `self`, but I think it c=
ould be more clear.
Perhaps something like the following (change in bold):
Calls the given block once for each element in self, passing that element a=
s a parameter, **and returning the array itself.**
Thanks!
--=20
https://bugs.ruby-lang.org/