From: sawadatsuyoshi@... Date: 2021-08-02T01:43:04+00:00 Subject: [ruby-core:104745] [Ruby master Feature#18057] Introduce Array#average Issue #18057 has been updated by sawa (Tsuyoshi Sawada). I have thought that what you wrote as the comment in the example code snippet are the expected return values. You made clear in note#3 that they are not. Then, what are they representing? If they are random comments irrelevant to the proposal, then you should delete them to avoid confusion. ---------------------------------------- Feature #18057: Introduce Array#average https://bugs.ruby-lang.org/issues/18057#change-93080 * Author: ggmichaelgo (Michael Go) * Status: Open * Priority: Normal ---------------------------------------- Introduce Array#average to calculate the average value of an array. ```ruby array = [1, 2, 3] array.average # 3 array = [1.5, 2.2, 3.1] array.average(&:round) # 3.5 array = [-3, -2, -1] array.average { |e| e.abs } # 3 ``` -- https://bugs.ruby-lang.org/ Unsubscribe: