Skip to content

Commit

Permalink
Merge pull request #108 from tachyons/fix_93
Browse files Browse the repository at this point in the history
Avoid mutating @url_path to avoid unexpected side effects
  • Loading branch information
thinkingserious authored Dec 8, 2018
2 parents 5d7f4bd + 19f935b commit 37fb694
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/ruby_http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ def add_ssl(http)
# - Client object
#
def _(name = nil)
url_path = name ? @url_path.push(name) : @url_path
@url_path = []
url_path = name ? @url_path + [name] : @url_path
Client.new(host: @host, request_headers: @request_headers,
version: @version, url_path: url_path,
http_options: @http_options)
Expand Down

0 comments on commit 37fb694

Please sign in to comment.