Repository navigation
Set operations retain compare_by_identity flag - #1403
Conversation
|
The relevant changes are already made in ruby/ruby and will be synchronized soon (ruby/ruby#18848). The only change that will be needed to do is to adjust version guards for new behavior and raplace |
f72222e to
50109a6
Compare
|
Thanks! I've rebased this onto the layout from ruby/ruby#18848, so once the sync lands, the only difference should be the guard versions. I used Checked with In 🤖 Generated with Claude Code |
50109a6 to
75cfad3
Compare
|
Sorry, I misread your earlier comment. As the README says, ruby/spec targets the latest stable release of each series, so One note: the CI matrix is still on 4.0.7, which doesn't have the backport, so the new "retains" examples will fail there until it moves to 4.0.9. 🤖 Generated with Claude Code |
|
Neither PR (this one nor #1405) can be merged right now as far as they fail CI checks. I would propose the following scenario:
|
Set#&, #classify, #divide, #flatten, #flatten! and #map! keep the receiver's compare_by_identity flag since the fix for [Bug #22174]. See https://bugs.ruby-lang.org/issues/22174 Same as the specs from ruby/ruby#18848. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
75cfad3 to
e2faa6a
Compare
|
Sounds good. I've updated this PR to keep the 🤖 Generated with Claude Code |
|
Thank you! |
Since the fix for Bug #22174 (ruby/ruby@f069efc3f6),
Set#&,#classify,#divide,#flatten,#flatten!and#map!keep the receiver'scompare_by_identityflag. The current specs expectfalseunconditionally, so they fail on 4.0.9 and 4.1.This PR applies the spec changes from ruby/ruby#18848 as is: "retains" under
ruby_version_is "4.1"and "does not retain" under""..."4.0". That keeps CI green on the current 4.0.7 matrix.Merge order, as suggested in the review:
"4.1"guards to"4.0", since the fix was backported in 4.0.8 (ruby/ruby@1533c10971)Seen in RubyInstaller2 CI on 4.0.9: https://github.com/oneclick/rubyinstaller2/actions/runs/39949977572/job/120434751465
Checked with
mspec-run core/set: 4.0.5, 4.0.9 and 4.1.0-preview1 all pass.🤖 Generated with Claude Code