bitfields 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bitfields.rb +1 -1
- data/lib/bitfields/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 106a09ba14ca7da95a4fa0c8b2da45a0a4de5624
|
4
|
+
data.tar.gz: 2ed11e3e4ef88782ace1559d73ead45c8c34b59c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed6b161c7dc68ac136a09fb03491c3bdde83c74f99798457c7aac1f4404dbb5fb4ff42f61ba3e584e6f99bcdfec39df95175ddb6efb8e098bb3b3ce0993621a6
|
7
|
+
data.tar.gz: c1564e6c0144701399a9f288d26993daa31ff60fdd3a46b37b9babe19eb00cd2449b607ec7e4987e57532d369e7668fdfbbef4574bb4ef76d314dd9e406d7ce8
|
data/lib/bitfields.rb
CHANGED
@@ -29,7 +29,7 @@ module Bitfields
|
|
29
29
|
|
30
30
|
def self.extract_bits(options)
|
31
31
|
bitfields = {}
|
32
|
-
options.keys.select{|key| key.is_a?(
|
32
|
+
options.keys.select{|key| key.is_a?(Numeric) }.each do |bit|
|
33
33
|
raise "#{bit} is not a power of 2 !!" unless bit.to_s(2).scan('1').size == 1
|
34
34
|
bit_name = options.delete(bit).to_sym
|
35
35
|
raise DuplicateBitNameError if bitfields.include?(bit_name)
|
data/lib/bitfields/version.rb
CHANGED