bit_utils 0.1.1-java → 0.1.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +10 -0
- data/README.md +2 -1
- data/lib/bit_utils/core_ext/each_bit.rb +11 -7
- data/lib/bit_utils/core_ext/popcount.rb +12 -7
- data/lib/bit_utils/core_ext/trailing_zeros.rb +11 -7
- data/lib/bit_utils/version.rb +1 -1
- data/lib/bit_utils.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a2b0b0d3970d146f5016e5913146b028ca23153
|
4
|
+
data.tar.gz: 12e573a02869659f92372a7d5129f52d627daba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10e0ea0b0cbd52b72830f6ebfed911ea5e7dea8f6903c50ce81f35e75927ce3aaa60834bbfb28ddb3757c8a3868dd00cc2b1d570be94239c1e8ef9b00e2e4bb5
|
7
|
+
data.tar.gz: f6ec28eeb2cca14f64b6185bd1cdc6d23a915bb4a8bcaaee4c17e15f31f6b633c87ce6a048298a3582ed2fb9445783a6f6ec8f5c7dfbf3881f3225a80f998abc
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -53,7 +53,8 @@ If negative `num` is given, it raises `RangeError`
|
|
53
53
|
### common to all functionalities
|
54
54
|
All of the module functions raise `TypeError` unless the parameter is `Integer`.
|
55
55
|
|
56
|
-
All module functions have `.#xxx_fixnum` and `.#xxx_bignum` (specific for `Fixnum` and `Bignum`), but these are not intended for direct use
|
56
|
+
All module functions have `.#xxx_fixnum` and `.#xxx_bignum` (specific for `Fixnum` and `Bignum`), but these are not intended for direct use;
|
57
|
+
these will be removed in the future..
|
57
58
|
|
58
59
|
|
59
60
|
## Development
|
@@ -1,15 +1,19 @@
|
|
1
1
|
require 'bit_utils'
|
2
2
|
|
3
|
-
# Core Extension for
|
4
|
-
class
|
3
|
+
# Core Extension for Integer
|
4
|
+
class Integer
|
5
5
|
def each_bit(&block)
|
6
|
-
BitUtils.
|
6
|
+
BitUtils.each_bit self, &block
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
unless BitUtils::INTEGER_UNITED
|
11
|
+
|
12
|
+
# Core Extension for Fixnum
|
13
|
+
class Fixnum
|
14
|
+
def each_bit(&block)
|
15
|
+
BitUtils.each_bit_fixnum self, &block
|
16
|
+
end
|
14
17
|
end
|
18
|
+
|
15
19
|
end
|
@@ -1,15 +1,20 @@
|
|
1
1
|
require 'bit_utils'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
|
4
|
+
# Core Extension for Integer
|
5
|
+
class Integer
|
5
6
|
def popcount
|
6
|
-
BitUtils.
|
7
|
+
BitUtils.popcount self
|
7
8
|
end
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
unless BitUtils::INTEGER_UNITED
|
12
|
+
|
13
|
+
# Core Extension for Fixnum
|
14
|
+
class Fixnum
|
15
|
+
def popcount
|
16
|
+
BitUtils.popcount_fixnum self
|
17
|
+
end
|
14
18
|
end
|
19
|
+
|
15
20
|
end
|
@@ -1,15 +1,19 @@
|
|
1
1
|
require 'bit_utils'
|
2
2
|
|
3
|
-
# Core Extension for
|
4
|
-
class
|
3
|
+
# Core Extension for Integer
|
4
|
+
class Integer
|
5
5
|
def trailing_zeros
|
6
|
-
BitUtils.
|
6
|
+
BitUtils.trailing_zeros self
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
unless BitUtils::INTEGER_UNITED
|
11
|
+
|
12
|
+
# Core Extension for Fixnum
|
13
|
+
class Fixnum
|
14
|
+
def trailing_zeros
|
15
|
+
BitUtils.trailing_zeros_fixnum self
|
16
|
+
end
|
14
17
|
end
|
18
|
+
|
15
19
|
end
|
data/lib/bit_utils/version.rb
CHANGED
data/lib/bit_utils.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bit_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Jkr2255
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
92
|
- ".travis.yml"
|
93
|
+
- CHANGELOG.md
|
93
94
|
- Gemfile
|
94
95
|
- LICENSE.txt
|
95
96
|
- README.md
|