Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ruby-2.3 feature #10769] add Enumerable#chunk_while, spec for it #3517

Merged
merged 1 commit into from
Dec 13, 2015

Conversation

cthulhua
Copy link
Contributor

@cthulhua cthulhua commented Dec 6, 2015

Implemented as #slice_when, but slice when block does not match rather than when it does.
Also added merged over ruby spec for it.

@cthulhua cthulhua force-pushed the feature-enumerable-chunk_while branch from 0622664 to 091afe9 Compare December 6, 2015 08:21
@kares
Copy link
Member

kares commented Dec 8, 2015

@eregon is it fine to have the rubyspec updates coming in like they are here?

@kares kares added this to the JRuby 9.1.0.0 milestone Dec 8, 2015
@cthulhua
Copy link
Contributor Author

I saw that a similar thing was done for slice_when, so I added them.

@eregon
Copy link
Member

eregon commented Dec 12, 2015

@kares @cthulhua Sorry, I missed your mention.
It would be better and simpler (for merging) to just let the regular rubyspec import take care of it.
But if it's the exact same change, then most likely there won't be a conflict (to be verified though).

@cthulhua
Copy link
Contributor Author

Ah OK - would you prefer that I remove the change? I wrote the rubyspec for this so I know there is no conflict - seems more hygienic to let the standard ruby spec import handle it though.

Should I add the tests for this somewhere else?

@eregon
Copy link
Member

eregon commented Dec 12, 2015

@cthulhua If it's not much effort, this would be cleaner 😃

No, we should just import latest rubyspec into this repo before the 2.3 merge
(@kares you can ask me, otherwise I do it every month).

@cthulhua cthulhua force-pushed the feature-enumerable-chunk_while branch 2 times, most recently from 085961a to 6429e6c Compare December 13, 2015 01:40
@cthulhua
Copy link
Contributor Author

@eregon I removed the rubyspec change. I noticed that in ruby/ruby there was a test added for chunk_while (https://github.com/ruby/ruby/blob/trunk/test/ruby/test_enum.rb#L683) so i added it to the same place under test/mri, since that seemed to be what other folks did when they added ruby-2.3 features.

@cthulhua cthulhua force-pushed the feature-enumerable-chunk_while branch from 6429e6c to 33928b5 Compare December 13, 2015 01:43
@cthulhua cthulhua changed the title [ruby-2.3 feature #10769] add Enumerable#chunk_while, rubyspec for it [ruby-2.3 feature #10769] add Enumerable#chunk_while, spec for it Dec 13, 2015
@cthulhua cthulhua force-pushed the feature-enumerable-chunk_while branch from 33928b5 to 6521c8b Compare December 13, 2015 01:49
add chunk_while_contiguously_increasing_integers test to test_enum.rb
@cthulhua cthulhua force-pushed the feature-enumerable-chunk_while branch from 6521c8b to aa399d4 Compare December 13, 2015 02:31
kares added a commit that referenced this pull request Dec 13, 2015
[ruby-2.3 feature #10769] add Enumerable#chunk_while, spec for it
@kares kares merged commit d79adf4 into jruby:ruby-2.3 Dec 13, 2015
@cthulhua cthulhua deleted the feature-enumerable-chunk_while branch December 13, 2015 10:31
@eregon
Copy link
Member

eregon commented Dec 13, 2015

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants