Project

General

Profile

Feature #10958

remove "initial_state" argument of Enumerable#{slice_before,chunk}

Added by akr (Akira Tanaka) about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I'd like to remove "initial_state" argument of Enumerable#{slice_before,chunk}.

I think a state management can be implemented using local variable without the argument.
So I'd like to remove it because it is too complex and
not consistent with Enumerable#{slice_when,slice_after} which doesn't have the argument.

Note that I added deprecated warning since Ruby 2.2.
It seems no one complained the warning until now.


Files


Related issues

Related to Ruby trunk - Bug #13202: Enumerable#slice_before does not take both argument and block at the same time, as it ought to.ClosedActions

Associated revisions

Revision 774f6829
Added by akr (Akira Tanaka) about 4 years ago

  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50174
Added by akr (Akira Tanaka) about 4 years ago

  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]

Revision 50174
Added by akr (Akira Tanaka) about 4 years ago

  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]

Revision 50174
Added by akr (Akira Tanaka) about 4 years ago

  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]

Revision 50174
Added by akr (Akira Tanaka) about 4 years ago

  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]

Revision 50174
Added by akr (Akira Tanaka) about 4 years ago

  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]

History

#1

Updated by Eregon (Benoit Daloze) about 4 years ago

+1, making these two simpler is definitely an improvement!

#2

Updated by akr (Akira Tanaka) about 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r50174.


  • enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. [Feature #10958]
#3

Updated by akr (Akira Tanaka) about 4 years ago

It seems no one against this. I committed.

#4

Updated by naruse (Yui NARUSE) about 2 years ago

  • Related to Bug #13202: Enumerable#slice_before does not take both argument and block at the same time, as it ought to. added

Also available in: Atom PDF