Repository navigation
Fix Enumerable#each_cons and each_slice to return a receiver - #1509
Merged
nobu merged 6 commits intoOct 25, 2021
Merged
Conversation
nobu
reviewed
Jan 1, 2017
Contributor
Author
|
What should I make CI successful for? |
Member
|
Make a branch with version guards and send a pull request to https://github.com/ruby/spec. |
Member
Note that the Travis was revived by 9d4266f , only managing non-x86 cases. |
marivaldo
reviewed
Oct 25, 2021
There was a problem hiding this comment.
Suggested change
| * h = {foo: 0, bar: 1, baz: 2, bam: 3} | |
| * h = {foo: 0, bar: 1, baz: 2, bam: 3} |
knu
approved these changes
Oct 25, 2021
knu
left a comment
Member
There was a problem hiding this comment.
I'm the original author of these methods and this is fine with me.
koic
added a commit
to koic/rubocop
that referenced
this pull request
Oct 26, 2021
This PR fixes the following build error.
```console
% bundle exec rspec ./spec/rubocop/cop/layout/block_alignment_spec.rb:222
(snip)
# ./lib/rubocop/cop/layout/block_alignment.rb:97:in `start_for_block_node'
# ./lib/rubocop/cop/layout/block_alignment.rb:82:in `on_block'
# ./lib/rubocop/cop/commissioner.rb:100:in `public_send'
# ./lib/rubocop/cop/commissioner.rb:100:in `block (2 levels) in trigger_responding_cops'
# ./lib/rubocop/cop/commissioner.rb:160:in `with_cop_error_handling'
# ./lib/rubocop/cop/commissioner.rb:99:in `block in trigger_responding_cops'
```
https://app.circleci.com/pipelines/github/rubocop/rubocop/5414/workflows/4a7e4b81-7380-41e5-8ede-e28d9160010d/jobs/201236
I reported on this change of behavior.
https://bugs.ruby-lang.org/issues/18268
And it was due to the following change.
ruby/ruby#1509
This PR will be changed to the cop logic that is not affected by the above Ruby 3.1.0-dev change.
5 of 8 tasks
This was referenced Jan 3, 2022
soutaro
added a commit
to ruby/rbs
that referenced
this pull request
Feb 1, 2022
soutaro
added a commit
to ruby/rbs
that referenced
this pull request
Feb 1, 2022
41 of 48 tasks
66 of 70 tasks
jcmfernandes
added a commit
to jcmfernandes/truffleruby
that referenced
this pull request
Jan 13, 2023
This was referenced Jan 13, 2023
jcmfernandes
added a commit
to jcmfernandes/truffleruby
that referenced
this pull request
Jan 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why not?
I think
Enumerable#each_consandEnumerable#each_sliceare extensions ofeachmethod, so to return a receiver looks a natural behavior.