From: muraken@... Date: 2017-11-29T03:06:47+00:00 Subject: [ruby-core:83938] [Ruby trunk Feature#14044] Introduce a new attribute `step` in Range Issue #14044 has been updated by mrkn (Kenta Murata). Assignee set to matz (Yukihiro Matsumoto) Target version set to next minor ---------------------------------------- Feature #14044: Introduce a new attribute `step` in Range https://bugs.ruby-lang.org/issues/14044#change-67994 * Author: mrkn (Kenta Murata) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: next minor ---------------------------------------- As described in #13904, Numo::NArray and PyCall touches internal structure of Enumerator to obtain the argument of `Range#step`. **This information is necessary to realize the same manner of the utilization of Python's slices**. In this ticket, I propose to introduce the new attribute `step` in an instance of `Range` class. Its role is same as the `step` attribute of Python's slice. `Range#step` should be changed to return a new Range object with the given step value instead of an Enumerator. The default value of `step` attribute is `nil`, and it means that step is 1. -- https://bugs.ruby-lang.org/ Unsubscribe: