lib/bindata/bits.rb in bindata-2.4.15 vs lib/bindata/bits.rb in bindata-2.5.0

- old
+ new

@@ -3,11 +3,11 @@ module BinData # Defines a number of classes that contain a bit based integer. # The integer is defined by endian and number of bits. - module BitField #:nodoc: all + module BitField # :nodoc: all @@mutex = Mutex.new class << self def define_class(name, nbits, endian, signed = :unsigned) @@mutex.synchronize do @@ -154,13 +154,13 @@ end end # Create classes for dynamic bitfields { - "Bit" => :big, - "BitLe" => :little, - "Sbit" => [:big, :signed], - "SbitLe" => [:little, :signed], + 'Bit' => :big, + 'BitLe' => :little, + 'Sbit' => [:big, :signed], + 'SbitLe' => [:little, :signed] }.each_pair { |name, args| BitField.define_class(name, :nbits, *args) } # Create classes on demand module BitFieldFactory def const_missing(name)