From: eric.ebbesen@... Date: 2014-11-22T17:00:56+00:00 Subject: [ruby-core:66415] [ruby-trunk - Bug #10536] [Open] RubyDoc example for Enumerable#map incorrect Issue #10536 has been reported by Eric Ebbesen. ---------------------------------------- Bug #10536: RubyDoc example for Enumerable#map incorrect https://bugs.ruby-lang.org/issues/10536 * Author: Eric Ebbesen * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: 2.0, 2.1.0 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- ```collect``` is shown in the example section instead of ```map``` This is fully the case for the 2.0 doc (http://ruby-doc.org/core-2.0/Enumerable.html#method-i-map) and partially the case for the 2.1 doc (http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-map). For example, from http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-map: ~~~ (1..4).map { |i| i*i } #=> [1, 4, 9, 16] (1..4).collect { "cat" } #=> ["cat", "cat", "cat", "cat"] ~~~ -- https://bugs.ruby-lang.org/