Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Avoid chunk argument #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Avoid chunk argument #3

wants to merge 5 commits into from

Conversation

bjorne
Copy link
Contributor

@bjorne bjorne commented Jul 19, 2016

The argument to Enumerable#chunk was removed in 2.3:

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

This also adds 2.3.1 to the Travis build matrix.

state[:sum] = object.size
state[:index] += 1
sum = 0
index = 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sum = index = 0 to save a line? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the current format. #wontfix

@bjorne bjorne force-pushed the avoid-chunk-argument branch 2 times, most recently from b520ded to 0f13782 Compare July 19, 2016 09:36
bjorne added 4 commits July 19, 2016 11:37
The argument to Enumerable#chunk was removed in 2.3:

> * enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes
>   the initial_state argument. [Feature #10958]
Should be fine since we in practive only invoke #chunk once.
@bjorne bjorne force-pushed the avoid-chunk-argument branch from 5847d30 to c60e3af Compare July 19, 2016 09:49
The chunking performed within RestorePlan#price and Cli#restore was
inconsistent. This did not show because of the memoization that existed
previously.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants