We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replication steps:
ruby -ryaml -e "a = YAML.load('servers: ::ffff:10.10.10.1'); puts a; puts a['servers']" {"servers"=>:":ffff:10.10.10.1"} :ffff:10.10.10.1
expected:
{"servers"=>"::ffff:10.10.10.1"} ::ffff:10.10.10.1
actual result:
{"servers"=>:":ffff:10.10.10.1"} :ffff:10.10.10.1
Environment:
ruby --version ruby 2.7.0p0 gem list yaml yaml (0.3.0)
Python yaml works as expected:
python3.9 -c 'import yaml; a=yaml.safe_load("servers: ::ffff:10.10.10.1"); print(a); print(a["servers"]);' {'servers': '::ffff:10.10.10.1'} ::ffff:10.10.10.1
The text was updated successfully, but these errors were encountered:
I guess this is because Python doesn't have the concept of a Symbol like Ruby does?
As a work-around, this should work (untested):
ruby -ryaml -e "a = YAML.load('servers: "::ffff:10.10.10.1"'); puts a; puts a['servers']"
I'm not sure what to do about this. I'm sure there are Ruby users that well expect symbols in this case so I don't want to change the behavior.
Sorry, something went wrong.
No branches or pull requests
replication steps:
expected:
actual result:
Environment:
Python yaml works as expected:
The text was updated successfully, but these errors were encountered: