From ed9334ed5bfa442619ce17760d99d2d7a2342733 Mon Sep 17 00:00:00 2001 From: dcrosby Date: Tue, 17 Dec 2024 12:57:26 -0800 Subject: [PATCH] [rubocop] Style/RedundantBegin Signed-off-by: David Crosby --- lib/mixlib/versioning.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/mixlib/versioning.rb b/lib/mixlib/versioning.rb index 5fa759d..f6e2686 100644 --- a/lib/mixlib/versioning.rb +++ b/lib/mixlib/versioning.rb @@ -66,11 +66,11 @@ def self.parse(version_string, format = nil) # Attempt to parse from the most specific formats first. parsed_version = nil formats.each do |version| - begin - break parsed_version = version.new(version_string) - rescue Mixlib::Versioning::ParseError - next - end + + break parsed_version = version.new(version_string) + rescue Mixlib::Versioning::ParseError + next + end parsed_version end