mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
Fix Hash.try_convert.
This commit is contained in:
parent
94d28bdfbb
commit
03627aa42a
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ class Hash
|
||||||
class << self
|
class << self
|
||||||
def try_convert(object)
|
def try_convert(object)
|
||||||
if object.is_a?(Hash) ||
|
if object.is_a?(Hash) ||
|
||||||
(object.respond_to?(:to_h) && (object = object.to_str).is_a?(Hash))
|
(object.respond_to?(:to_hash) && (object = object.to_hash).is_a?(Hash))
|
||||||
object
|
object
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue