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.5.12
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.5.13
Choose a head ref
  • 14 commits
  • 8 files changed
  • 1 contributor

Commits on Oct 15, 2025

  1. Configuration menu
    Copy the full SHA
    f7d617b View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2025

  1. 🚚 Extract Config::AttrVersionDefaults module

    This will be used to simplify the code in lib/net/imap/config.rb.
    In this first step, only a couple pieces are extracted:
    * `AttrVersionDefaults` stores the `Config.version_defaults` hash.
      The hash's `#default_proc` is defined there, too.
    * `AttrVersionDefaults.compile` only freezes that hash.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    b6b4898 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1846b4d View commit details
    Browse the repository at this point in the history
  3. ♻️ Compile version_defaults hashes into configs

    This refactoring decouples the assignment of versioned default values
    and the creation of `version_defaults` config objects.  At first,
    `version_defaults` stores hashes for each version's updated defaults.
    At the end, the hashes are transformed into config objects by
    `Config::AttrVersionDefaults.compile!`.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    f035a48 View commit details
    Browse the repository at this point in the history
  4. ♻️ Allow Config[version] to work up to v1.0

    This also causes Config[0.7r] through Config[1.0r] to be aliases (rather
    than clones) of each other.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    3dd53a7 View commit details
    Browse the repository at this point in the history
  5. 🚚 Compile Config[:defaults] in AttrVersionDefaults

    This avoids usage of the private `Config#defaults_hash` method, relying
    instead on the public `#load_defaults` API.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    c079172 View commit details
    Browse the repository at this point in the history
  6. ♻️ Define config defaults with the attr definitions

    At the cost of one big conflict now, this should significantly reduce
    future merge conflicts in the config file.  It's also easier to match
    documentation with default values when they're right next to each other.
    
    This also assigns all of the original (`Config[0]`) defaults explicitly,
    and not only where they differ from Config.default.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    d48e658 View commit details
    Browse the repository at this point in the history
  7. ♻️ Compile Config.default using AttrVersionDefaults

    Similar to the versioned defaults, this could be a source of conflicts
    when merging, rebasing, or cherry-picking feature and backport branches.
    Now that all of the attributes specify their defaults, the current
    version's default config can be compiled from that.
    
    The sanity-check at the end of `config.rb` has been removed.  It was
    there to protect against bad merges.  Now that `Config.default` is also
    compiled from the version defaults added to each attr_accessor, the
    tests in `test/net/imap/test_config.rb` are good enough.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    d496299 View commit details
    Browse the repository at this point in the history
  8. 🔀 Merge pull request #584 from ruby/backport-0.5/config/defaults

    ♻️ Refactor Config.versioned_defaults to reduce merge conflicts (backport to 0.5)
    nevans authored Dec 17, 2025
    Configuration menu
    Copy the full SHA
    9b3208a View commit details
    Browse the repository at this point in the history
  9. 🐛 Fix SequenceSet#delete?(num..num) to return set

    According to the rdoc, using a range with `#delete?` should return a
    sequence set (or nil), but the check came after importing the input, and
    was based on whether the imported run contained multiple values.  So
    deleting a single number range (e.g: `1..1` or `"1:1"`) would return a
    number not a set.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    9cf6cfe View commit details
    Browse the repository at this point in the history
  10. 🐛 Fix SequenceSet#max(n), cardinality < n <= size

    This backports #580 to `v0.5-stable`.
    
    When `SequenceSet#max(n)` is called with `n > cardinality`, it _should_
    return a duplicate of the whole set.  But, `#max(n)` is implemented
    using `#slice(-n..)`, and (copying the behavior of `Array`), when a
    slicing starts from an out-of-range index, it returns `nil`.
    
    It was using `-[count, size].min` to keep the index from going
    out-of-range.  Prior to 0.6.0, `#size` is the same as `#count`, so it
    gives incorrect results when the set contains an endless range.
    `SequenceSet#cardinality` has not been backported to 0.5, so this makes
    that calculation inline.
    
    This change should also give a small performance boost, because it
    bypasses the complexity of `#slice(range)` and just calls `#dup` (or
    returns `self` when the set is frozen).
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    ffb007a View commit details
    Browse the repository at this point in the history
  11. 🔖 Bump version to 0.5.13

    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    931c094 View commit details
    Browse the repository at this point in the history
  12. 🐛 Fix #responses() freezing internal arrays

    Now that `:frozen_dup` is the default behavior for `#responses` when
    it's called without any arguments, a critical bug has become apparent:
    it was not freezing the internal responses arrays directly, rather than
    copies of them.  Freezing these arrays will, of course, lead to further
    issues.
    
    Ideally, code should be updated to use one of the other forms of
    `#responses`, since this form is less efficient and also (intentionally)
    incompatibile with old code that expects it to return mutable arrays.
    But this is still a major bug.
    
    Fixes #581, reported by @yurikoval.
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    389223d View commit details
    Browse the repository at this point in the history
  13. 📦 Drop digest from Gemfile (workaround for #576)

    `digest` 3.2.1 was released since the last `net-imap` release.  And
    apparently `bundle exec rake release` activates `digest` _before_
    loading the Gemfile.  But, since `digest` is a default gem anyway, not
    including it in the Gemfile should be okay, I think.
    
    See the errors here:
    * 1st attempt: https://github.com/ruby/net-imap/actions/runs/20212203897/job/58019727242
    * Merged #575
    * 2nd attempt: https://github.com/ruby/net-imap/actions/runs/20219369554/job/58038064382
    nevans committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    27b33c1 View commit details
    Browse the repository at this point in the history
Loading