libbin 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libbin/data_types.rb +6 -5
- data/lib/libbin.rb +2 -2
- data/libbin.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d6b93ee63ec0916ee685a6b1b646a4fb6a742e31158049bc46f387db3a4ee27
|
4
|
+
data.tar.gz: dc8c1ea1218694f5b4ad8a53baa60e721a7b533474db9674939b40d25cb7ee06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 808407aad8f8de68723199114b84434027b3a936360496785574cfdb34567c6cf6bcffcfb044c02885c9211794bd34b25fb916323724cedfd69dfddd34cf0254
|
7
|
+
data.tar.gz: 005fb654400e4b7eaa5c9137aa7ea55d30f61b62d9c4c6f13b385046118b5dcbddda3347331397d1f1cb6cf217c3aef3a50ebd493dc123ea1c8a8f792d6fcb69
|
data/lib/libbin/data_types.rb
CHANGED
@@ -3,9 +3,10 @@ module LibBin
|
|
3
3
|
module RangeRefinement
|
4
4
|
refine Range do
|
5
5
|
def +(other)
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
return other.dup unless min
|
7
|
+
return self.dup unless other.min
|
8
|
+
Range::new(min <= other.min ? min : other.min,
|
9
|
+
max >= other.max ? max : other.max)
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
@@ -26,7 +27,7 @@ module LibBin
|
|
26
27
|
@members = nil
|
27
28
|
else
|
28
29
|
@members = args[0]
|
29
|
-
@range = @members.values.flatten.compact.collect(&:range).reduce
|
30
|
+
@range = @members.values.flatten.compact.collect(&:range).reduce(:+)
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -52,7 +53,7 @@ module LibBin
|
|
52
53
|
if args.length == 2
|
53
54
|
@range = Range::new(args[0], args[1])
|
54
55
|
else
|
55
|
-
@range = args[0].values.flatten.compact.collect(&:range).reduce
|
56
|
+
@range = args[0].values.flatten.compact.collect(&:range).reduce(:+)
|
56
57
|
end
|
57
58
|
end
|
58
59
|
|
data/lib/libbin.rb
CHANGED
@@ -335,11 +335,11 @@ module LibBin
|
|
335
335
|
self
|
336
336
|
end
|
337
337
|
|
338
|
-
def self.convert(input, output, input_big = LibBin::default_big?, output_big = !
|
338
|
+
def self.convert(input, output, input_big = LibBin::default_big?, output_big = !input_big, parent = nil, index = nil, length = nil)
|
339
339
|
if length
|
340
340
|
length.times.collect {
|
341
341
|
h = self::new
|
342
|
-
h.
|
342
|
+
h.__convert(input, output, input_big, output_big, parent, index)
|
343
343
|
}
|
344
344
|
else
|
345
345
|
h = self::new
|
data/libbin.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'libbin'
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.7"
|
4
4
|
s.author = "Brice Videau"
|
5
|
-
s.email = "brice.videau@
|
5
|
+
s.email = "brice.videau@gmail.com"
|
6
6
|
s.homepage = "https://github.com/kerilk/libbin"
|
7
7
|
s.summary = "Library for loading and converting binary files"
|
8
8
|
s.description = "Read, write and convert Binary data in Ruby."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libbin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice Videau
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 0.3.0
|
33
33
|
description: Read, write and convert Binary data in Ruby.
|
34
|
-
email: brice.videau@
|
34
|
+
email: brice.videau@gmail.com
|
35
35
|
executables: []
|
36
36
|
extensions:
|
37
37
|
- ext/libbin/extconf.rb
|