Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML-LibYAML CPAN distribution.

Report information
The Basics
Id: 54461
Status: new
Priority: 0/
Queue: YAML-LibYAML

People
Owner: Nobody in particular
Requestors: dstahlke [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.32
Fixed in: (no value)



Subject: exponential notation written in invalid form
It appears that numbers with exponential notation are required to contain a decimal point: $ perl -MYAML::XS -e 'print Dump(1e-15)' --- 1e-15 $ irb irb(main):001:0> require 'yaml' => true irb(main):002:0> YAML.load("--- 1e-15").class => String irb(main):003:0> YAML.load("--- 1.0e-15").class => Float
From: dstahlke [...] gmail.com
And the same thing applies to NaN and Inf: $ perl -MYAML::XS -e 'print Dump(9**9**9)' --- -nan $ perl -MYAML::XS -e 'print Dump(sin(-9**9**9))' --- inf YAML needs ".nan" and ".inf".
From: dstahlke [...] gmail.com
It appears that "1e15" is to be considered a floating point number according to the YAML spec version 1.2 section 10.2 "Recommended Schemas / JSON" but apparently this is not the schema used by ruby. In ruby "1e15" is a string but "1.0e15" is a float.