From 18cfafb5d8864ecc057c5eafbf0b6d4df6e5febd Mon Sep 17 00:00:00 2001 From: mokha Date: Thu, 8 Feb 2018 15:44:40 -0700 Subject: use ruby 2.2.0 syntax. --- lib/saml/kit/cli/yaml_registry.rb | 12 +++++++----- 1 file 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 -- cgit v1.2.3