Skip to content

Commit

Permalink
Allow aliases because YAML.dump generates aliases when it sees multip…
Browse files Browse the repository at this point in the history
…le occurrences of an object
  • Loading branch information
knu committed Jun 7, 2021
1 parent 7a1bf4f commit 2c220f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http/cookie_jar/yaml_saver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def default_options

if YAML.name == 'Psych' && Psych::VERSION >= '3.1'
def load_yaml(yaml)
YAML.safe_load(yaml, :permitted_classes => %w[Time HTTP::Cookie Mechanize::Cookie DomainName])
YAML.safe_load(yaml, :permitted_classes => %w[Time HTTP::Cookie Mechanize::Cookie DomainName], :aliases => true)
end
else
def load_yaml(yaml)
Expand Down

0 comments on commit 2c220f4

Please sign in to comment.