bindata 2.4.0 → 2.4.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: 273d7545be91c481736500d0acc038741cce9327
4
- data.tar.gz: 50326341e03e5bb741d78d7025470576e9389b34
3
+ metadata.gz: 287dc21d091ca6cdda977286425d87c7613fb80e
4
+ data.tar.gz: a68acaeb433ae8556e4f9768cbbc06a07e06578d
5
5
  SHA512:
6
- metadata.gz: ede91bae71b3e11e97d95e586fbaa215b4b3c09aa32cab067f9dfde861687c0a421c8b59654e5e4bd3661e5562b221010af71b3e5b66bcf5d3fcbc9a77003265
7
- data.tar.gz: 043a8490cc4c132ff909562084e4e1b4de46bd1ae892f14e8b2c981a981052ada21eb3d2d3a615e381dd58a898e6f11ebf3b5095da010a083185cd2e0b19b77c
6
+ metadata.gz: f87986492f2a430a86de20750dceb19b02321f0ad6e1b43f464f6e5e588d707342bab4ce8d6ac5e6b48d981c2fc4dc5a843d0f2943d8f01e87669f907c30065c
7
+ data.tar.gz: 9cf8d01d87539990bae13edc30b5e513ec40fc6ab7667927a8adf67c382d76b58ce5bb32c706cf50cc1e4a1c8eb4158f616904d2860b0c43bcaacf8b65c9db67
@@ -1,5 +1,10 @@
1
1
  = BinData Changelog
2
2
 
3
+ == Version 2.4.1 (2017-08-30)
4
+
5
+ * Fix crash with String :length invoking :rel_offset. Reported by Claudius
6
+ Coenen.
7
+
3
8
  == Version 2.4.0 (2017-04-09)
4
9
 
5
10
  * Reworked internal sanitizing API.
@@ -29,7 +29,7 @@ module BinData
29
29
  @overrides = overrides if overrides
30
30
  if val.is_a? Symbol
31
31
  __send__(val)
32
- elsif val.respond_to? :arity
32
+ elsif callable?(val)
33
33
  instance_exec(&val)
34
34
  else
35
35
  val
@@ -95,11 +95,15 @@ module BinData
95
95
  def recursively_eval(val, args)
96
96
  if val.is_a?(Symbol)
97
97
  parent.__send__(val, *args)
98
- elsif val.respond_to?(:arity)
98
+ elsif callable?(val)
99
99
  parent.instance_exec(&val)
100
100
  else
101
101
  val
102
102
  end
103
103
  end
104
+
105
+ def callable?(obj)
106
+ Proc === obj || Method === obj || UnboundMethod === obj
107
+ end
104
108
  end
105
109
  end
@@ -1,3 +1,3 @@
1
1
  module BinData
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
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.4.0
4
+ version: 2.4.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: 2017-04-09 00:00:00.000000000 Z
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake