From: nagachika00@... Date: 2017-03-27T15:43:40+00:00 Subject: [ruby-core:80390] [Ruby trunk Bug#10944] Documentation of Array.new w.r.t. element index available to a block Issue #10944 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.2: DONE, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: DONE, 2.3: DONE, 2.4: REQUIRED ruby_2_3 r58163 merged revision(s) 58037. ---------------------------------------- Bug #10944: Documentation of Array.new w.r.t. element index available to a block https://bugs.ruby-lang.org/issues/10944#change-63879 * Author: dgc (Don Cruickshank) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784) [i386-linux] * Backport: 2.2: DONE, 2.3: DONE, 2.4: REQUIRED ---------------------------------------- In http://ruby-doc.org/core-2.2.1/Array.html#class-Array-label-Creating+Arrays The documentation for the Array.new method is missing the fact that the element index is available to a given block. E.g. Array.new(4) { |x| x } #=> [0, 1, 2, 3] -- https://bugs.ruby-lang.org/ Unsubscribe: