ingydotnet / yaml-libyaml-pm

Perl Binding to libyaml
http://search.cpan.org/dist/YAML-LibYAML/
33 stars 37 forks source link

Clone node before analyzing (fix #32) #55

Closed vti closed 7 years ago

vti commented 7 years ago

It looks like SvPV_nomg adds the string representation for the number and creates side effects.

perl -MDevel::Peek -MYAML::XS -e \
'$x = 123; print Devel::Peek::Dump($x); YAML::XS::Dump($x); print Devel::Peek::Dump($x)'

This breaks tied tests, but it looks like the test was invalid, since generating bare values should be fine there.

perlpunk commented 7 years ago

thanks! it looks good to me, although I don't fully understand the buggy behavior. I pinged @ingydotnet

perlpunk commented 7 years ago

I think I understand it now. I guess the SvTYPE comparison didn't work correctly before for tied data, that's why the tied.t test is correct now.

perlpunk commented 7 years ago

thanks again, merged and released as 0.65_001! I also added a test for this.

perlpunk commented 7 years ago

Released 0.66