return_safe_yield 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +10 -0
- data/lib/return_safe_yield.rb +2 -2
- data/lib/return_safe_yield/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 624ec29f858d7f59cac8be59cbcf4066365855113fc86f24599ccd331f3244e0
|
4
|
+
data.tar.gz: 47fee91a646d3f29556caf33bbc468cdf4aedaa56bd75499b2d9e4bf4e8aa384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df167cc9cbc230e75303e134a7cf98c9b4cc3b1b2622c25edf55b898232ee0bad95c2ad79d22663c0b59d173e621c2b5f728e42047049981a6288910e0fa6ead
|
7
|
+
data.tar.gz: 9455d0d3706c0589cb6a2a4313091dac7b74a67257fd604a2c415e286c93f1adcd2ed9ce72bd9c593c1ff0dda0b8564dc1271e24132235874eeb95c7d8255cfb
|
data/README.md
CHANGED
@@ -154,6 +154,16 @@ be a safe, welcoming space for collaboration, and contributors are expected to
|
|
154
154
|
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
|
155
155
|
conduct.
|
156
156
|
|
157
|
+
## Changelog
|
158
|
+
|
159
|
+
### 0.2.0
|
160
|
+
|
161
|
+
* Rescue all exceptions inheriting from `Exception`
|
162
|
+
|
163
|
+
### Until 0.1.3
|
164
|
+
|
165
|
+
* Undocumented releases
|
166
|
+
|
157
167
|
## License
|
158
168
|
|
159
169
|
The gem is available as open source under the terms of the [MIT
|
data/lib/return_safe_yield.rb
CHANGED
@@ -47,7 +47,7 @@ module ReturnSafeYield
|
|
47
47
|
first_block_result = first.call(*args)
|
48
48
|
returned = false
|
49
49
|
return first_block_result
|
50
|
-
rescue
|
50
|
+
rescue Exception
|
51
51
|
exception = true
|
52
52
|
fail
|
53
53
|
ensure
|
@@ -83,7 +83,7 @@ module ReturnSafeYield
|
|
83
83
|
result = block.call(*args, &cb)
|
84
84
|
state = :regular
|
85
85
|
return result
|
86
|
-
rescue
|
86
|
+
rescue Exception
|
87
87
|
state = :exception
|
88
88
|
fail
|
89
89
|
ensure
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: return_safe_yield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Remo Fritzsche
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
|
98
|
-
rubygems_version: 2.6.6
|
97
|
+
rubygems_version: 3.0.3
|
99
98
|
signing_key:
|
100
99
|
specification_version: 4
|
101
100
|
summary: Provides helpers for dealing with `return` statements in blocks and procs.'
|