From 4215c9d868f8368089e59487c2e38172ccb752c5 Mon Sep 17 00:00:00 2001 From: hotovson Date: Sat, 24 Sep 2016 23:06:26 +0200 Subject: [PATCH] fix Lint/NonLocalExitFromIterator --- .rubocop_todo.yml | 5 ----- lib/autotest/cucumber_mixin.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a22aff30c2..5c981a7e23 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -72,11 +72,6 @@ Lint/NestedMethodDefinition: Exclude: - 'lib/cucumber/formatter/ansicolor.rb' -# Offense count: 1 -Lint/NonLocalExitFromIterator: - Exclude: - - 'lib/autotest/cucumber_mixin.rb' - # Offense count: 7 Lint/RescueException: Exclude: diff --git a/lib/autotest/cucumber_mixin.rb b/lib/autotest/cucumber_mixin.rb index 4084b80b7c..408baedb37 100644 --- a/lib/autotest/cucumber_mixin.rb +++ b/lib/autotest/cucumber_mixin.rb @@ -71,7 +71,7 @@ def run_features hook :run_features Tempfile.open('autotest-cucumber') do |dirty_features_file| cmd = self.make_cucumber_cmd(self.features_to_run, dirty_features_file.path) - return if cmd.empty? + break if cmd.empty? puts cmd unless $q old_sync = $stdout.sync $stdout.sync = true