From 5d4c978c76a2f434ba7686ea740fde35460e3e16 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 8 Dec 2021 16:06:10 +0100 Subject: [PATCH] parse 5.0 as a Float --- lib/parser.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/parser.rb b/lib/parser.rb index 0c5a27d..da4753e 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -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