Skip to content

Fix ArgumentError.#37

Closed
vakuum wants to merge 1 commit intosparklemotion:masterfrom
vakuum:pr-1
Closed

Fix ArgumentError.#37
vakuum wants to merge 1 commit intosparklemotion:masterfrom
vakuum:pr-1

Conversation

@vakuum
Copy link
Copy Markdown

@vakuum vakuum commented Sep 29, 2021

The following line in lib/http/cookie_jar/abstract_store.rb cause an ArgumentError:

raise IndexError, 'cookie store unavailable: %s, error: %s' % symbol.inspect, e.message

The parameters of the % operator must be passed as an array:

raise IndexError, 'cookie store unavailable: %s, error: %s' % [symbol.inspect, e.message]

Without this change:

> HTTP::Cookie::VERSION
 => "1.0.4" 

> HTTP::CookieJar.new(store: :unknown)
...
ArgumentError (too few arguments)

With this change:

> HTTP::Cookie::VERSION
 => "1.0.4" 

> HTTP::CookieJar.new(store: :unknown)
...
ArgumentError (cookie store unavailable: :unknown, error: cannot load such file -- http/cookie_jar/unknown_store)

@julien-pinchelimouroux
Copy link
Copy Markdown

julien-pinchelimouroux commented Oct 26, 2023

Why is this PR not already merged ?
We have the same issue in production based on RestClient http-cookie usage.

image

This is also fixed by #43

@flavorjones
Copy link
Copy Markdown
Member

This was fixed in 44374a7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants