with 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/with.rb +4 -9
- metadata +2 -2
data/lib/with.rb
CHANGED
|
@@ -26,15 +26,10 @@ module Kernel
|
|
|
26
26
|
exception = e
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
raise exception if exception
|
|
34
|
-
end
|
|
35
|
-
else
|
|
36
|
-
raise exception if exception
|
|
37
|
-
end
|
|
29
|
+
|
|
30
|
+
raise exception if objects.none? {|object|
|
|
31
|
+
object.respond_to?(:__exit__) && object.__exit__(exception)
|
|
32
|
+
} && exception
|
|
38
33
|
|
|
39
34
|
result
|
|
40
35
|
end
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: with
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- meh.
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-08-
|
|
13
|
+
date: 2011-08-28 00:00:00 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
16
16
|
description:
|