summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2018-02-08 15:44:40 -0700
committermokha <mokha@cisco.com>2018-02-08 15:44:40 -0700
commit18cfafb5d8864ecc057c5eafbf0b6d4df6e5febd (patch)
treee0b9361379d5135c15b4e7a78b0dbaf9939ca40a
parented3e8263911dac10f5350d7d97a41b01cf14a366 (diff)
use ruby 2.2.0 syntax.
-rw-r--r--lib/saml/kit/cli/yaml_registry.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/saml/kit/cli/yaml_registry.rb b/lib/saml/kit/cli/yaml_registry.rb
index 1470b33..cf386df 100644
--- a/lib/saml/kit/cli/yaml_registry.rb
+++ b/lib/saml/kit/cli/yaml_registry.rb
@@ -35,11 +35,13 @@ module Saml
if @in_transaction
yield @items
else
- @items.transaction do
- @in_transaction = true
- yield @items
- ensure
- @in_transaction = false
+ begin
+ @items.transaction do
+ @in_transaction = true
+ yield @items
+ ensure
+ @in_transaction = false
+ end
end
end
end