You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require"yaml"classConfigYAML.mapping(x:Int32, y:Float64)
end
str =<<-YAMLdev: x: 12464 y: 3.5YAML
dev =Hash(String, Config).from_yaml(str)["dev"]
dev.y # => 3.5
This doesn't:
require"yaml"classConfigYAML.mapping(x:Int32, y:Float64)
end
str =<<-YAMLdev: x: 12464 y: 0.5YAML
dev =Hash(String, Config).from_yaml(str)["dev"]
#=> Expected Float64, not 0.5 at line 3, column 6
I'm using scientific notation (5e-2) as a workaround at the moment, which also works.
The text was updated successfully, but these errors were encountered:
Crystal version:
Crystal 0.24.1 (2017-12-26) LLVM: 5.0.1 Default target: x86_64-apple-macosx
This works:
This doesn't:
I'm using scientific notation (
5e-2
) as a workaround at the moment, which also works.The text was updated successfully, but these errors were encountered: