- Notifications
You must be signed in to change notification settings - Fork34
Comparing changes
Open a pull request
base repository:ruby/net-imap
Uh oh!
There was an error while loading.Please reload this page.
base:5b8f9ae
head repository:ruby/net-imap
Uh oh!
There was an error while loading.Please reload this page.
compare:644a5d1
- 10commits
- 3files changed
- 1contributor
Commits on Apr 29, 2025
🐛 Fix
SequenceSet#slicewith range(start...0)The bug was that exclusive ranges ending in zero would be converted toend on `-1`, which would be interpretted as the last value in the range.
nevans committedApr 29, 2025 🐛 Fix inconsistently frozen SequenceSet#[] result
This maybe isn't actually documented very well (or at all...) but mostSequenceSet transform methods return a frozen result when +self+ isfrozen and a mutable result when +self+ is mutable. Except +limit+which always returns a frozen result. And (before this commit) +slice+,which inconsistently returned with matching frozen status when theresult wasn't empty, but always returned a frozen set when the result_was_ empty.Adding these tests exposed a much more significant bug:`SequenceSet#xor` mutates the reciever.
nevans committedApr 29, 2025 🐛
SequenceSet#xorshould not modifyself`set ^ other` and `set.xor other` are supposed to be safe transforms.But, unfortunately, they modified the receiver if it wasn't frozen, andcrashed when it was!The fix is trivial: convert `self` to `dup`.
nevans committedApr 29, 2025 🐛 Fix SequenceSet#slice when length > result size
The goal is for `#[]` (aliased as `#slice`) to behave similarly to`Array#[]`/`Array#slice`. When `Array#slice` has a length or range thatextends beyond the end of the array, they simply return everythingup to the end.
🔀 Merge pull request#461from ruby/backport/v0.4-seqset-bugfixes
🐛 Backport v0.4 SequenceSet bugfixes
✅ Add tests for
SequenceSet#xorI'm not sure how this escaped testing before, but yikes!
nevans committedApr 29, 2025 ✅ Add basic fuzz tests for SequenceSet operators
I almost accidentally committed a big bug for `#xor`. Yikes! I decidedto take that opportunity to simply add some randomized tests on all ofthe set operators, based on set identities that should always hold true.These can also be used for microbenchmarks and profiling of SequenceSet.
🔀 Merge pull request#466from ruby/backport/0.4-seqset-tests
✅ Backport `SequenceSet` tests to 0.4
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff 5b8f9ae...644a5d1
Uh oh!
There was an error while loading.Please reload this page.