From a7c441aa17ba64eb702b583ac9198cdace599d2e Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 4 Feb 2016 16:32:41 +0100 Subject: Use `delete` instead of assignment operator when filtering build abilities --- app/models/ability.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 00f5f3a93b3..a866eadeebb 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -411,7 +411,7 @@ class Ability # If we can't read build we should also not have that # ability when looking at this in context of commit_status %w(read create update admin).each do |rule| - rules -= [:"#{rule}_commit_status"] unless rules.include?(:"#{rule}_build") + rules.delete(:"#{rule}_commit_status") unless rules.include?(:"#{rule}_build") end rules end -- cgit v1.2.1