parse 5.0 as a Float

This commit is contained in:
Gwenhael Le Moine 2021-12-08 16:06:10 +01:00
parent 63da2d408b
commit 5d4c978c76
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -75,6 +75,7 @@ module Rpl
begin
parsed_entry[:value] = Float( parsed_entry[:value] )
parsed_entry[:value] = parsed_entry[:value].to_i if (parsed_entry[:value] % 1).zero? && elt.index('.').nil?
rescue ArgumentError
parsed_entry[:value] = Integer( parsed_entry[:value] )
end