Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ruby/net-imap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.20
Choose a base ref
...
head repository: ruby/net-imap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.4.21
Choose a head ref
  • 10 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 29, 2025

  1. 🐛 Fix SequenceSet#slice with range (start...0)

    The bug was that exclusive ranges ending in zero would be converted to
    end on `-1`, which would be interpretted as the last value in the range.
    nevans committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    ee2b40c View commit details
    Browse the repository at this point in the history
  2. 🐛 Fix inconsistently frozen SequenceSet#[] result

    This maybe isn't actually documented very well (or at all...) but most
    SequenceSet transform methods return a frozen result when +self+ is
    frozen 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 the
    result 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 committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    14d698e View commit details
    Browse the repository at this point in the history
  3. 🐛 SequenceSet#xor should not modify self

    `set ^ other` and `set.xor other` are supposed to be safe transforms.
    But, unfortunately, they modified the receiver if it wasn't frozen, and
    crashed when it was!
    
    The fix is trivial: convert `self` to `dup`.
    nevans committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    33367bb View commit details
    Browse the repository at this point in the history
  4. 🐛 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 that
    extends beyond the end of the array, they simply return everything
    up to the end.
    nevans committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    da1390c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    06fb071 View commit details
    Browse the repository at this point in the history
  6. 🔀 Merge pull request #461 from ruby/backport/v0.4-seqset-bugfixes

    🐛 Backport v0.4 SequenceSet bugfixes
    nevans authored Apr 29, 2025
    Configuration menu
    Copy the full SHA
    e0f997c View commit details
    Browse the repository at this point in the history
  7. ✅ Add tests for SequenceSet#xor

    I'm not sure how this escaped testing before, but yikes!
    nevans committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    4b3270c View commit details
    Browse the repository at this point in the history
  8. ✅ Add basic fuzz tests for SequenceSet operators

    I almost accidentally committed a big bug for `#xor`.  Yikes!  I decided
    to take that opportunity to simply add some randomized tests on all of
    the set operators, based on set identities that should always hold true.
    
    These can also be used for microbenchmarks and profiling of SequenceSet.
    nevans committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    45e39d1 View commit details
    Browse the repository at this point in the history
  9. 🔀 Merge pull request #466 from ruby/backport/0.4-seqset-tests

    ✅ Backport `SequenceSet` tests to 0.4
    nevans authored Apr 29, 2025
    Configuration menu
    Copy the full SHA
    8b09881 View commit details
    Browse the repository at this point in the history
  10. 🔖 Bump version to 0.4.21

    nevans committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    644a5d1 View commit details
    Browse the repository at this point in the history
Loading