canistor 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0db8b15cc4d48bb737af43f199bd418d0a4b79c205c4f67dc241a2c3d08eb386
4
- data.tar.gz: 035a3cca90ea0d94336427f1d6554104e8a30ec0da4e6b6ead66c721afcd402d
3
+ metadata.gz: 59501e753c65e612e9baebee0b2630d61349aa6ccb118c0fe19d911f35e6ecd9
4
+ data.tar.gz: c778f30a4bf2b62e9a868da84afddfeb5b32b2a16d9b33ecbc5605e38efcc466
5
5
  SHA512:
6
- metadata.gz: 3a38f47802510c25f54642e4e8c795680f93069aab74c94fca026b772eeae80f40c15630f4bed6e1e02015ccb10a0565476fbffcb2e23c1ff399d4ccf945b7ab
7
- data.tar.gz: f17ff958dbe963a2a3c822bda49ff839e8be254231338ea8c43e7e8b7653269a6b752cf9161b5dbe84f0264100722a0a466a4d48ad029111b73d43925a55364a
6
+ metadata.gz: 8850ba294c1c67f2a6ed6032c59227f46c4f5a99dafaa0ddb1f2eaff28ee0a017c559a96151356e0fbe730d59af31c82e554afcda668530b874bcb0848acd492
7
+ data.tar.gz: a9ec578207f4ab60c86d1f35b121395c819a3383b70284c927d1a79aa2f3700e255533d530e86e8ec3081518531b11b128383611433f63d46f97fa988f8fc6e6
data/lib/canistor.rb CHANGED
@@ -177,8 +177,11 @@ module Canistor
177
177
  def self.take_fail(operation, &block)
178
178
  fail_mutex.synchronize do
179
179
  if index = @fail.index(operation)
180
- block.call
181
- @fail.delete_at(index)
180
+ begin
181
+ block.call
182
+ ensure
183
+ @fail.delete_at(index)
184
+ end
182
185
  end
183
186
  end
184
187
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canistor
4
- VERSION = '0.1.3'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canistor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manfred Stienstra