summaryrefslogtreecommitdiff
path: root/lib/declarative_policy
diff options
context:
space:
mode:
author🙈 jacopo beschi 🙉 <intrip@gmail.com>2018-04-18 09:19:40 +0000
committerRémy Coutable <remy@rymai.me>2018-04-18 09:19:40 +0000
commitc6b1043e9d1b7fe9912c330b6e7d4342f2a9694e (patch)
tree45c3fd39c83122eb602f217501924bc8d6899987 /lib/declarative_policy
parent3529ccae9e3a484da5a4fba32bfdf0317f289363 (diff)
downloadgitlab-ce-c6b1043e9d1b7fe9912c330b6e7d4342f2a9694e.tar.gz
Resolve "Make a Rubocop that forbids returning from a block"
Diffstat (limited to 'lib/declarative_policy')
-rw-r--r--lib/declarative_policy/runner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/declarative_policy/runner.rb b/lib/declarative_policy/runner.rb
index 77c91817382..87f14b3b0d2 100644
--- a/lib/declarative_policy/runner.rb
+++ b/lib/declarative_policy/runner.rb
@@ -77,7 +77,7 @@ module DeclarativePolicy
@state = State.new
steps_by_score do |step, score|
- return if !debug && @state.prevented?
+ break if !debug && @state.prevented?
passed = nil
case step.action