lib/protobuf/field/float_field.rb in protobuffy-3.6.0 vs lib/protobuf/field/float_field.rb in protobuffy-4.0.0

- old
+ new

@@ -18,10 +18,14 @@ def acceptable?(val) val.respond_to?(:to_f) end + def coerce!(val) + Float(val) + end + def decode(bytes) bytes.unpack('e').first end def encode(value) @@ -33,6 +37,5 @@ end end end end -