summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTino Wehe <tino.wehe@brandrockers.com>2015-04-01 12:47:00 +0200
committerTino Wehe <tino.wehe@brandrockers.com>2015-04-01 12:47:00 +0200
commit7564d38f6fe3aad1291750e17d815017a646032d (patch)
tree39fb81be527ad889d231bcbf3a61338467706d0b
parenta04cae1fb0528b1daad569c1fc7c1e568e1df2b8 (diff)
downloadgitlab-ci-7564d38f6fe3aad1291750e17d815017a646032d.tar.gz
fixed houndci messages
- "Redundant return detected." - "Pass &:strip as an argument to map instead of a block."
-rw-r--r--app/models/job.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/job.rb b/app/models/job.rb
index b14cc33..3a358c1 100644
--- a/app/models/job.rb
+++ b/app/models/job.rb
@@ -40,7 +40,7 @@ class Job < ActiveRecord::Base
includes = false
# extract the refs - split by ","
# is tricky because they can be in a regex too
- refs.scan(/\w+|\/+.*?\/+/).map{|re| re.strip}.each do |re|
+ refs.scan(/\w+|\/+.*?\/+/).map(&:strip).each do |re|
# is regexp or not
if re.start_with?("/") && re.end_with?("/")
includes = !ref.match(/#{re.delete("/")}/i).nil?
@@ -50,6 +50,6 @@ class Job < ActiveRecord::Base
break if includes == true
end
- return includes
+ includes
end
end