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

Remove initial state from slice_before and chunk #3580

Merged
merged 3 commits into from Jan 21, 2016

Conversation

@jsyeo
Copy link
Member

@jsyeo jsyeo commented Jan 21, 2016

For Feature #10958

@jsyeo jsyeo added the Ruby 2.3 label Jan 21, 2016
pattern_given = !(undefined.equal? pattern)

raise ArgumentError, "cannot pass both pattern and block" if pattern_given && block_given?
raise ArgumentError, "wrong number of arguments (0 for 1)" if !pattern_given && !block_given?
Copy link
Member

@brixen brixen Jan 21, 2016

Choose a reason for hiding this comment

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

@jsyeo what about "a pattern or a block must be provided" for this to explain the error better?

Also, I've added you to the Rubinius contributors. Feel free to merge this and new commits if you feel confident in them. If you'd like feedback or are unsure, please use a PR.

Thanks!

Loading

Copy link
Member Author

@jsyeo jsyeo Jan 21, 2016

Choose a reason for hiding this comment

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

what about "a pattern or a block must be provided" for this to explain the error better?

Sounds good! Let me use that.

Feel free to merge this and new commits if you feel confident in them. If you'd like feedback or are unsure, please use a PR.

Oh okay, got it!

Loading

jsyeo added a commit that referenced this issue Jan 21, 2016
Remove initial state from slice_before and chunk
@jsyeo jsyeo merged commit 9cf58de into rubinius:master Jan 21, 2016
1 check passed
Loading
@chuckremes chuckremes mentioned this pull request Jan 21, 2016
52 tasks
jsyeo added a commit to jsyeo/rubinius that referenced this issue Jan 21, 2016
Remove initial state from slice_before and chunk
@jemc
Copy link
Member

@jemc jemc commented Jan 22, 2016

Isn't this an example of a breaking change?

How do we handle deprecation in this case, as per the versioning rules?

Loading

@YorickPeterse
Copy link
Member

@YorickPeterse YorickPeterse commented Jan 22, 2016

@jemc It seems the initial state argument has been removed as of Ruby 2.3, while it was deprecated starting with 2.2. According to our versioning rules we should add a deprecation first and then remove it. Having said that, since we aren't going to "deploy" all Ruby 2.3 support in a single release I'm not sure how useful this would be.

Loading

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

Successfully merging this pull request may close these issues.

None yet

4 participants