xor_reverse_bitswap 0.2.0 → 0.3.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: 3e211abcb0ee65f3130fb82ac8a6ae4c603f4c49a3ebae1e8a92ef6dd82756a4
4
- data.tar.gz: 819d8db4fa89522d4a5e3876a2e4e6c26b1fe33568852720b8cafd06c8d2c3b6
3
+ metadata.gz: 3c4f84e853e259548cdee96fa12ec29414e9eae0760d53d64103821927787e7a
4
+ data.tar.gz: c0b8c0133120a5aa99336c13a320e376d3e35e9b5d7fc6b9785409d5daca563c
5
5
  SHA512:
6
- metadata.gz: 28c0efb07aea2b2c42de8409ae16a05a0fe28635b01a768de611ee92b2cc9ddf3a4a741b19cfe25f0962a073520e0f7e8a8f12bd1eca156d3c54d2bce87e69a1
7
- data.tar.gz: aa0b92b17a46db6f65d15dc0ec642288218868314be8348683532fd6f02c887b7dd6404a5a000beebfbed4e6438833f8d7e8017ba5a4bbe045602c12f9e58508
6
+ metadata.gz: 985581c86d84420a7078b9cbbd4fd4ce49411c8eadd7ea23119efaa1ff29883623492facc28b20b276e3590c5a237694a32c32f058f6c22592c74c642ec23a9a
7
+ data.tar.gz: bb5355721632e1f44340bb658820fb5e1aed3dc4f8c185e00f68f751d39a1f22b914addd0e0e0d8e363163b2c0b4c56ffc899776c7c176c554b679c911e53900
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xor_reverse_bitswap (0.2.0)
4
+ xor_reverse_bitswap (0.3.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.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -25,7 +25,7 @@ module XorReverseBitswap
25
25
 
26
26
  bit_range_size = range_size.to_s(2).size
27
27
  if step_size > 1
28
- (0..range_size).map do |n|
28
+ (0..range_size).lazy.map do |n|
29
29
  value = (n ^ range_size).to_s(2).rjust(bit_range_size, "0").reverse.to_i(2)
30
30
  [
31
31
  start_range + (value * step_size),
@@ -36,7 +36,7 @@ module XorReverseBitswap
36
36
  end
37
37
  end
38
38
  else
39
- (1..range_size).map do |n|
39
+ (1..range_size).lazy.map do |n|
40
40
  value = (n ^ range_size).to_s(2).rjust(bit_range_size, "0").reverse.to_i(2)
41
41
  [
42
42
  start_range + (value * step_size),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xor_reverse_bitswap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patryk Ptasinski