- permit decimal values in :number validation

This commit is contained in:
Jordan Sissel 2013-03-22 14:57:43 -07:00
parent 2f916d2958
commit 40ada1369e

View file

@ -350,7 +350,7 @@ module LogStash::Config::Mixin
if value.size > 1 # only one value wanted
return false, "Expected number, got #{value.inspect}"
end
if value.first.to_s.to_i.to_s != value.first.to_s
if value.first.to_s.to_f.to_s != value.first.to_s
return false, "Expected number, got #{value.first.inspect}"
end
result = value.first.to_i