Avoid a deprecation warning with BinData

This commit is contained in:
Nick Thomas
2011-06-20 23:23:28 +01:00
parent afb82d2a5a
commit fcb0ca0b54

View File

@@ -132,7 +132,7 @@ module BtcWireProto
# Variable-length integer. This is slightly scary.
# @author Nick Thomas <nick@lupine.me.uk>
class VarInt < BinData::BasePrimitive
register_self
register_self if BinData::VERSION < "1.3.2"
def value_to_binary_string(val)
val = val.to_i