bindata 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bindata might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53f36d1668fe4f1636ca00ab18b3764890d80b2b
4
- data.tar.gz: bef4e40c419d1a411872e33cda5889d8d7f7d4f6
3
+ metadata.gz: 8c2c402445f12f30bacb95e174ec062916c0f899
4
+ data.tar.gz: 05fd4d2d0d195a817fe0056d7db707073167826a
5
5
  SHA512:
6
- metadata.gz: 4fecf533fc319ba22a437255557cc72ba48f2b3ac23d7fbc8870b50cbce77ceb8d443e1191646b5683f04f5d8633450b09e71131635399db8c34e7483a2bcadf
7
- data.tar.gz: b0336f625a5a88ab2842e55b71b85920982ee66b89e021d7480a4238087f9532bed94c484ba1a44197987cbb67ca0a1ce81fc0a4043fbacaf9c7b405a9b6ce57
6
+ metadata.gz: e35b838106b7bf8d4317f5f12f82a5726a4b42cc4c9435c414b52e2ba6269ffe76732b2943879d7e5fd316f8857237e59c516403af667e231c5ff17767900877
7
+ data.tar.gz: 048dec43da3620cbd4d950378af2f8ea9fdfeb3b38f8eb842faffa0b78a0d94344c656b90a649efabc638f07dfb2619f780b1088964171d08ae593073aec5c7c
data/ChangeLog.rdoc CHANGED
@@ -1,5 +1,10 @@
1
1
  = BinData Changelog
2
2
 
3
+ == Version 2.3.1 (2016-06-17)
4
+
5
+ * Improve list of reserved words. Thanks to Claudius Coenen.
6
+ * Fix virtual fields to be bit aligned. Thanks to hopesea.
7
+
3
8
  == Version 2.3.0 (2016-03-25)
4
9
 
5
10
  * Add :to_abs_offset to Skip.
data/lib/bindata/base.rb CHANGED
@@ -265,8 +265,9 @@ module BinData
265
265
  end
266
266
 
267
267
  def top_level_get(sym)
268
- top_level.instance_variable_defined?("@tl_#{sym}") and
269
- top_level.instance_variable_get("@tl_#{sym}")
268
+ tl = top_level
269
+ tl.instance_variable_defined?("@tl_#{sym}") and
270
+ tl.instance_variable_get("@tl_#{sym}")
270
271
  end
271
272
 
272
273
  def top_level
@@ -246,10 +246,7 @@ module BinData
246
246
  end
247
247
 
248
248
  def hints
249
- {
250
- :endian => self[:endian],
251
- :search_prefix => self[:search_prefix],
252
- }
249
+ { :endian => self[:endian], :search_prefix => self[:search_prefix] }
253
250
  end
254
251
 
255
252
  def create_sanitized_endian(endian)
@@ -68,7 +68,11 @@ module BinData
68
68
  end ensure false for if in module next nil not or redo
69
69
  rescue retry return self super then true undef unless until
70
70
  when while yield} +
71
- %w{array element index value} ).collect { |name| name.to_sym }.
71
+ %w{array element index value} +
72
+ %w{type initial_length read_until} +
73
+ %w{fields endian search_prefix hide only_if byte_align} +
74
+ %w{choices selection copy_on_change} +
75
+ %w{read_abs_offset struct_params}).collect { |name| name.to_sym }.
72
76
  uniq.collect { |key| [key, true] }.flatten
73
77
  ]
74
78
 
@@ -1,3 +1,3 @@
1
1
  module BinData
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
@@ -30,12 +30,14 @@ module BinData
30
30
  #
31
31
  class Virtual < BinData::BasePrimitive
32
32
 
33
- def value_to_binary_string(val)
34
- ""
33
+ def do_read(io)
35
34
  end
36
35
 
37
- def read_and_return_value(io)
38
- nil
36
+ def do_write(io)
37
+ end
38
+
39
+ def do_num_bytes
40
+ 0.0
39
41
  end
40
42
 
41
43
  def sensible_default
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bindata
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dion Mendel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-25 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake