From: ibylich@... Date: 2019-06-13T19:30:11+00:00 Subject: [ruby-core:93114] [Ruby trunk Feature#15919] Offset parameter for `Integer#times` Issue #15919 has been updated by ibylich (Ilya Bylich). `Numeric#step` does something similar: ``` ruby > 3.step(to: 10, by: 2) { |a| p a } 3 5 7 9 ``` ---------------------------------------- Feature #15919: Offset parameter for `Integer#times` https://bugs.ruby-lang.org/issues/15919#change-78540 * Author: sawa (Tsuyoshi Sawada) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I request an optional argument on `Integer#times` to set the offset at start, just like `Enumerator#with_index`. ```ruby 5.times(3){|i| p i} # >> 3 # >> 4 # >> 5 # >> 6 # >> 7 ``` I think there are plenty of use cases, especially when the offset is 1. -- https://bugs.ruby-lang.org/ Unsubscribe: