mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Fix the compatibility code to support Syck.
This commit is contained in:
parent
fcdaddcbe6
commit
8ae076d9ea
1 changed files with 4 additions and 0 deletions
|
|
@ -38,6 +38,10 @@ class HTTP::CookieJar::YAMLSaver < HTTP::CookieJar::AbstractSaver
|
|||
data.each { |domain, paths|
|
||||
paths.each { |path, names|
|
||||
names.each { |cookie_name, cookie_hash|
|
||||
if cookie_hash.respond_to?(:ivars)
|
||||
# YAML::Object of Syck
|
||||
cookie_hash = cookie_hash.ivars
|
||||
end
|
||||
cookie = HTTP::Cookie.new(cookie_hash)
|
||||
jar.add(cookie)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue