rrb-common 0.1.7 → 0.1.8

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: 0ce1791f92b3956911a84c638f8c6b55b1dc41b250321f0ee14a3aa2e70771d0
4
- data.tar.gz: 1d80809c5a7633e2f379a3c6df03ad0cd278d127775a2ad76fae52c31f4ae534
3
+ metadata.gz: 0e485c8c918938ea3b3a6ece7f985818b568e7985d4313df90e22965ff64a977
4
+ data.tar.gz: c787f77c5555d8b65d5f0c026a14e21a37a587abb9b3b72d21d8f9c0b82abf3d
5
5
  SHA512:
6
- metadata.gz: 59abbc5acfb4daad674f5555d23adf9714987a448fbc6c051aee422977672206550973039df89f85dd27adc31b872763b3c700983022bf91333fe46232d7af0b
7
- data.tar.gz: af50e56189702d9c4820ec9a78e04ec0a4dc042a825ff7015d736938dd6119610d75df3e16792d7329eb2c7cc46f3dc8359fcdc8e2179ff96ec6cc7ceca94819
6
+ metadata.gz: f09bac24c6493d888dc4bb4e0a4cdc720bba53df704ac15bd7b21d8d019c635271cbc2854640fbb5361a392b396163fd520ca13d914f27043510c24283ea2da3
7
+ data.tar.gz: a46a128393cbb71962f7200d287f5b859a7b674812efc4ef341f034dd8fc7b42b447434f012da3b1fe1d17c4615df5dcadb28e6d43a0f2420376f62e4c4e94ba
@@ -167,22 +167,22 @@ module RuneRb::Core::WriteableBuffer
167
167
  @bit_position += amount
168
168
 
169
169
  while amount > bit_offset
170
- @buffer[byte_pos] = [0].pack('c') if @buffer[byte_pos].nil?
171
- @buffer[byte_pos] = [(@buffer[byte_pos].unpack1('c') & ~RuneRb::Core::BIT_MASK_OUT[bit_offset])].pack('c')
172
- @buffer[byte_pos] = [(@buffer[byte_pos].unpack1('c') | (value >> (amount - bit_offset)) & RuneRb::Core::BIT_MASK_OUT[bit_offset])].pack('c')
170
+ @data[byte_pos] = [0].pack('c') if @data[byte_pos].nil?
171
+ @data[byte_pos] = [(@data[byte_pos].unpack1('c') & ~RuneRb::Core::BIT_MASK_OUT[bit_offset])].pack('c')
172
+ @data[byte_pos] = [(@data[byte_pos].unpack1('c') | (value >> (amount - bit_offset)) & RuneRb::Core::BIT_MASK_OUT[bit_offset])].pack('c')
173
173
  byte_pos += 1
174
174
  amount -= bit_offset
175
175
  bit_offset = 8
176
176
  end
177
177
 
178
- @buffer[byte_pos] = [0].pack('c') if @buffer[byte_pos].nil?
178
+ @data[byte_pos] = [0].pack('c') if @data[byte_pos].nil?
179
179
 
180
180
  if amount == bit_offset
181
- @buffer[byte_pos] = [(@buffer[byte_pos].unpack1('c') & ~RuneRb::Core::BIT_MASK_OUT[bit_offset])].pack('c')
182
- @buffer[byte_pos] = [(@buffer[byte_pos].unpack1('c') | (value & RuneRb::Core::BIT_MASK_OUT[bit_offset]))].pack('c')
181
+ @data[byte_pos] = [(@data[byte_pos].unpack1('c') & ~RuneRb::Core::BIT_MASK_OUT[bit_offset])].pack('c')
182
+ @data[byte_pos] = [(@data[byte_pos].unpack1('c') | (value & RuneRb::Core::BIT_MASK_OUT[bit_offset]))].pack('c')
183
183
  else
184
- @buffer[byte_pos] = [(@buffer[byte_pos].unpack1('c') & ~(RuneRb::Core::BIT_MASK_OUT[amount] << (bit_offset - amount)))].pack('c')
185
- @buffer[byte_pos] = [(@buffer[byte_pos].unpack1('c') | ((value & RuneRb::Core::BIT_MASK_OUT[amount]) << (bit_offset - amount)))].pack('c')
184
+ @data[byte_pos] = [(@data[byte_pos].unpack1('c') & ~(RuneRb::Core::BIT_MASK_OUT[amount] << (bit_offset - amount)))].pack('c')
185
+ @data[byte_pos] = [(@data[byte_pos].unpack1('c') | ((value & RuneRb::Core::BIT_MASK_OUT[amount]) << (bit_offset - amount)))].pack('c')
186
186
  end
187
187
  end
188
188
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrb-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick W.