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

Add missing require to hash_with_indifferent_access #41707

Commits on Mar 20, 2021

  1. Add missing require to hash_with_indifferent_access

    When requiring only "active_support/hash_with_indifferent_access",
    calling `slice!` method on `HashWithIndifferentAccess` object
    causes `NoMethodError`.
    This is caused by `slice!` method calls `super` which is defined
    in "active_support/core_ext/hash/slice" that' not required by this file.
    Adding `require "active_support/core_ext/hash/slice"` to hwia
    resolves this issue.
    
    Note: since all tests `require_relative "abstract_unit"` that requires
    "active_support/core_ext/hash/slice" eventually, it's pretty hard to
    test method behavior without require.
    okuramasafumi committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    e4de1ca View commit details
    Browse the repository at this point in the history