diff options
| author | Rémy Coutable <remy@rymai.me> | 2018-04-18 09:19:40 +0000 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2018-04-18 09:19:40 +0000 |
| commit | 40653b65b6a45df358ce40a278b08982891c541e (patch) | |
| tree | 45c3fd39c83122eb602f217501924bc8d6899987 /lib/api/variables.rb | |
| parent | 3529ccae9e3a484da5a4fba32bfdf0317f289363 (diff) | |
| parent | c6b1043e9d1b7fe9912c330b6e7d4342f2a9694e (diff) | |
| download | gitlab-ce-40653b65b6a45df358ce40a278b08982891c541e.tar.gz | |
Merge branch '42889-avoid-return-inside-block' into 'master'
Resolve "Make a Rubocop that forbids returning from a block"
Closes #42889
See merge request gitlab-org/gitlab-ce!18000
Diffstat (limited to 'lib/api/variables.rb')
| -rw-r--r-- | lib/api/variables.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/variables.rb b/lib/api/variables.rb index d08876ae1b9..a34de9410e8 100644 --- a/lib/api/variables.rb +++ b/lib/api/variables.rb @@ -31,7 +31,7 @@ module API key = params[:key] variable = user_project.variables.find_by(key: key) - return not_found!('Variable') unless variable + break not_found!('Variable') unless variable present variable, with: Entities::Variable end @@ -67,7 +67,7 @@ module API put ':id/variables/:key' do variable = user_project.variables.find_by(key: params[:key]) - return not_found!('Variable') unless variable + break not_found!('Variable') unless variable variable_params = declared_params(include_missing: false).except(:key) |
