If I have a YAML file like
---
2.1: my product version
without any quotation marks, Ruby will treat the 2.1
as a Float (at least under Syck - I'm not sure about Psych).
Are there any risks in using a Float as a hash's key, so long as all of the other occurences of the key are either from a YAML file or literals from Ruby?
[2,1,11]
) that is written in a peculiar way (2.1.11
). So the problem behind the question is moot :)Hash
, but it causes problems withRBTree
(at least with Psych):'@9.884112959068247e-09' is not allowed as an instance variable name