xor_reverse_bitswap 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c4f84e853e259548cdee96fa12ec29414e9eae0760d53d64103821927787e7a
4
- data.tar.gz: c0b8c0133120a5aa99336c13a320e376d3e35e9b5d7fc6b9785409d5daca563c
3
+ metadata.gz: 5dcce40c0e70e6ac2b8c324eb2ca58a14391bea227b8ad11cb91dd76f1d13893
4
+ data.tar.gz: dc9869f5cfe95bc4208615086a1dcd431a00ed1d08e38443dfe9cbd723404d9f
5
5
  SHA512:
6
- metadata.gz: 985581c86d84420a7078b9cbbd4fd4ce49411c8eadd7ea23119efaa1ff29883623492facc28b20b276e3590c5a237694a32c32f058f6c22592c74c642ec23a9a
7
- data.tar.gz: bb5355721632e1f44340bb658820fb5e1aed3dc4f8c185e00f68f751d39a1f22b914addd0e0e0d8e363163b2c0b4c56ffc899776c7c176c554b679c911e53900
6
+ metadata.gz: fb5318f6655baba897df6032eb594eec82fa057972273c8571a852df6d61e8363025dded278230de950ca4bb51d1885eca8c8fd4dc6241a9c7faec22aab081f3
7
+ data.tar.gz: 356f69a14c4563e90e242669d3b10c36de3809575398654a9948a9734fac0ca2933e684ed4cd9460b7f75c829a8a1b60c375b696f130b40025480e2ae40a8f8c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xor_reverse_bitswap (0.3.0)
4
+ xor_reverse_bitswap (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XorReverseBitswap
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
@@ -14,8 +14,8 @@ module XorReverseBitswap
14
14
  raise "range_size must be full 1s binary" unless range_size.to_s(2).count("0").zero?
15
15
 
16
16
  bit_range_size = range_size.to_s(2).size
17
- (0..range_size).map do |n|
18
- (n ^ range_size).to_s(2).rjust(bit_range_size, "0").reverse.to_i(2)
17
+ (0..range_size).lazy.map do |n|
18
+ start_range + (n ^ range_size).to_s(2).rjust(bit_range_size, "0").reverse.to_i(2)
19
19
  end
20
20
  end
21
21
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xor_reverse_bitswap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patryk Ptasinski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-28 00:00:00.000000000 Z
11
+ date: 2024-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Xor Reverse Bitswap - Single, Range, Enumerated Traversal
14
14
  email: