Skip to content

Commit

Permalink
Dup params and use delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Sep 19, 2017
1 parent 201c751 commit cdb697b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/slack/web/pagination/cursor.rb
Expand Up @@ -14,9 +14,9 @@ class Cursor
def initialize(client, verb, params = {})
@client = client
@verb = verb
@sleep_interval = params[:sleep_interval]
@max_retries = params[:max_retries] || client.default_max_retries
@params = params.reject { |k, _| [:sleep_interval, :max_retries].include?(k) }
@params = params.dup
@sleep_interval = @params.delete(:sleep_interval)
@max_retries = @params.delete(:max_retries) || client.default_max_retries
end

def each
Expand Down

0 comments on commit cdb697b

Please sign in to comment.