lib/sixword/lib.rb in sixword-0.3.4 vs lib/sixword/lib.rb in sixword-0.3.5
- old
+ new
@@ -94,10 +94,11 @@
int <<= 9
int += bits_array.fetch(5) >> 2
# check parity
unless parity_int(int) == parity
- raise InvalidParity.new("Parity bits do not match")
+ raise InvalidParity.new("Parity bits do not match: " +
+ word_array.join(' ').inspect)
end
# omit padding bits, if any
int >>= padding * 8