lib/decanter/parser/float_parser.rb in decanter-3.6.0 vs lib/decanter/parser/float_parser.rb in decanter-4.0.0
- old
+ new
@@ -1,8 +1,8 @@
module Decanter
module Parser
class FloatParser < ValueParser
- REGEX = /(\d|[.])/
+ REGEX = /(\d|[.]|[-])/
allow Float, Integer
parser do |val, options|
raise Decanter::ParseError.new 'Expects a single value' if val.is_a? Array