iso_latte 1.6 → 1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iso_latte.rb +6 -6
- data/lib/iso_latte/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 153c27390df8ee2ee187e29750f5b551129b857a
|
4
|
+
data.tar.gz: d233c65eb3b63c02e757e14b0e1d2e362b1d2536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a39a189e992e379f1e131e1867768d4c0d1bede658c00329819be0d5ac8de3314e5758e1465824089de2186147c3b2809179eb981ffd9e88cd04abe588151887
|
7
|
+
data.tar.gz: 796bcf446ac579ede9bbe6a0aa163aee452b0929538fc79ce56dd5636a0bc176212f3714a31ca85523229a3b85c542dab5f1384a6ce4dee2e093b32d32200267
|
data/lib/iso_latte.rb
CHANGED
@@ -46,8 +46,8 @@ module IsoLatte
|
|
46
46
|
block.call
|
47
47
|
end
|
48
48
|
rescue StandardError => e
|
49
|
-
|
50
|
-
write_ex
|
49
|
+
marshal(e) # To check if it works before writing any of it to the stream
|
50
|
+
marshal(e, write_ex)
|
51
51
|
write_ex.flush
|
52
52
|
write_ex.close
|
53
53
|
exit!(EXCEPTION_RAISED)
|
@@ -107,9 +107,9 @@ module IsoLatte
|
|
107
107
|
# Save us from the race condition where it exited just as we decided to kill it.
|
108
108
|
end
|
109
109
|
|
110
|
-
def self.marshal(e)
|
110
|
+
def self.marshal(e, io = nil)
|
111
111
|
begin
|
112
|
-
return Marshal.dump(e)
|
112
|
+
return io ? Marshal.dump(e, io) : Marshal.dump(e)
|
113
113
|
rescue NoMethodError
|
114
114
|
rescue TypeError
|
115
115
|
end
|
@@ -117,14 +117,14 @@ module IsoLatte
|
|
117
117
|
begin
|
118
118
|
e2 = e.class.new(e.message)
|
119
119
|
e2.set_backtrace(e.backtrace)
|
120
|
-
return Marshal.dump(e2)
|
120
|
+
return io ? Marshal.dump(e2, io) : Marshal.dump(e2)
|
121
121
|
rescue NoMethodError
|
122
122
|
rescue TypeError
|
123
123
|
end
|
124
124
|
|
125
125
|
e3 = IsoLatte::Error.new("Marshalling error with: #{e.message}")
|
126
126
|
e3.set_backtrace(e.backtrace)
|
127
|
-
Marshal.dump(e3)
|
127
|
+
io ? Marshal.dump(e3, io) : Marshal.dump(e3)
|
128
128
|
end
|
129
129
|
|
130
130
|
class Error < StandardError; end
|
data/lib/iso_latte/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iso_latte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emcien Engineering
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: IsoLatte allows execution to be forked from the main process for safety
|
15
15
|
email:
|