lib/bindata/base.rb in bindata-2.4.4 vs lib/bindata/base.rb in bindata-2.4.5
- old
+ new
@@ -170,11 +170,10 @@
# Returns the string representation of this data object.
def to_binary_s(&block)
io = BinData::IO.create_string_io
write(io, &block)
- io.rewind
- io.read
+ io.string
end
# Returns the hexadecimal string representation of this data object.
def to_hex(&block)
to_binary_s(&block).unpack('H*')[0]