lib/bindata/bits.rb in bindata-0.11.1 vs lib/bindata/bits.rb in bindata-1.0.0
- old
+ new
@@ -43,10 +43,10 @@
def _do_write(io)
raise "can't write whilst reading \#{debug_name}" if @in_read
io.writebits(_value, #{nbits}, :#{endian})
end
- def _do_num_bytes(ignored)
+ def _do_num_bytes
#{nbits} / 8.0
end
def read_and_return_value(io)
io.readbits(#{nbits}, :#{endian})