Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Michaelherold dash nil keys #554

Merged
merged 4 commits into from Nov 8, 2021

Commits on Oct 23, 2020

  1. Fix an imprecise spec for Dash#replace

    The check here doesn't make sense because it's testing the behavior of
    another method. The best way to check identity is but checking the
    `#object_id` of an object - thus, this check actually does what the test
    says it does.
    michaelherold authored and Michael Herold committed Oct 23, 2020
    Copy the full SHA
    ac2444c View commit details
    Browse the repository at this point in the history
  2. Expose IndifferentAccess conversion internally

    In some cases --- like writing meta-extensions of `IndifferentAccess`
    --- we need access to the ability to convert a key for the purposes of
    `IndifferentAccess`. Exposing this behavior as a module function makes
    this possible.
    michaelherold authored and Michael Herold committed Oct 23, 2020
    Copy the full SHA
    b9a9391 View commit details
    Browse the repository at this point in the history
  3. Ensure all properties are set on exported Dash

    When exporting a Dash via `#to_h` or `#to_hash`, we expect all
    properties to be exported whether or not they are set. However, in the
    change that allows codependent properties to be nilified, we regressed
    the behavior of exporting all properties.
    
    There is a gotcha here, which I note in the tests for the specs. For
    posterity, MRI does not send the `#to_hash` method to anything that
    subclasses `Hash` when you double-splat it. Thus, we cannot override the
    behavior within MRI. For more information, see [this comment][1] where I
    detail the behavior of double-splat within MRI.
    
    Currently, JRuby also follows this behavior, but it's not guaranteed
    that other Rubies will.
    
    [1]: hashie#353 (comment)
    michaelherold committed Oct 23, 2020
    Copy the full SHA
    98df995 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. Merge branch 'dash-nil-keys' of https://github.com/michaelherold/hashie

    … into michaelherold-dash-nil-keys
    dblock committed Nov 8, 2021
    Copy the full SHA
    25a3ff6 View commit details
    Browse the repository at this point in the history