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

Symbolize all the option keys at Redis::Client#initialize(option) #958

Closed
wants to merge 1 commit into from

Commits on Nov 16, 2020

  1. Symbolize all the option keys at Redis::Client#initialize(option)

    Previously, a limited portion of options are symbolized at
    `Redis::Client#initialize(option)`. Specifically, only those defined at
    `Redis::Client::DEFAULTS` are symbolized.
    
    This invoked confusing behavior and increased maintenance cost.
    For example, specifying timeout was a little bit tricky as follows.
    
    ```
    Redis::Client.new('timeout' => 10.0).options[:timeout]
    # => 10.0
    Redis::Client.new('read_timeout' => 10.0).options[:read_timeout]
    # => 5.0
    ```
    
    Now, all the keys of options are symbolized, and consistent
    external behavior is achieved.
    
    ```
    Redis::Client.new('timeout' => 10.0).options[:timeout]
    # => 10.0
    Redis::Client.new('read_timeout' => 10.0).options[:read_timeout]
    # => 10.0
    ```
    aeroastro committed Nov 16, 2020
    Copy the full SHA
    29244a0 View commit details
    Browse the repository at this point in the history