-
Notifications
You must be signed in to change notification settings - Fork 605
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
Conversation
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? |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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!
Remove initial state from slice_before and chunk
Remove initial state from slice_before and chunk
Isn't this an example of a breaking change? How do we handle deprecation in this case, as per the versioning rules? |
@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. |
For Feature #10958