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

Fix misleading exception in has_entry #513

Commits on Jun 12, 2021

  1. Fix misleading exception in has_entry

    If `has_entry` is called without any arguments, it will raise an
    exception like the following:
    
    ```
    ArgumentError: Too many arguments; use either a single argument (must be a Hash) or two arguments (a key and a value).
    ```
    
    This is because we don't check if the `options.length` is zero so when
    it is, the `else` branch executes and prints the above error. We can fix
    this by simply adding another branch to cover the case when
    `options.length` is zero.
    cstyles committed Jun 12, 2021
    Copy the full SHA
    29ce32a View commit details
    Browse the repository at this point in the history