The code below doesn't work, yet the type boolean exists and I used it in another class the same way, why doesn't it work here?
require 'bindata'
class TESTSTUFF < BinData::Record
array :boolstuff, :type => :boolean, :initial_length => 8
end
The error is: unknown type 'boolean' in TESTSTUFF (TypeError)
There is no such parameter as boolean
in bindata
. Use bit1
that's a 1-bit big endian integer and may be used as boolean. Look at the docs.