diff options
author | Nick Thomas <nick@gitlab.com> | 2019-08-23 10:26:12 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-08-23 10:26:12 +0000 |
commit | fd577b864f9a4f0c1b12d29d197ce9441253ef6c (patch) | |
tree | 26f08658ce7f9bc3250b37ab23897426bdaf1a0e /lib | |
parent | 1037935c68541a740249b9674b85545b40c2165b (diff) | |
parent | a50703f1e630d811a828b1c1f4834a687208d0d5 (diff) | |
download | gitlab-ce-fd577b864f9a4f0c1b12d29d197ce9441253ef6c.tar.gz |
Merge branch 'frozen_string_lib_2' into 'master'
Add frozen_string_literal to lib part 2
See merge request gitlab-org/gitlab-ce!32094
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/profiler.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/quick_actions/substitution_definition.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/profiler.rb b/lib/gitlab/profiler.rb index ec7671f9a8b..425c30d67fe 100644 --- a/lib/gitlab/profiler.rb +++ b/lib/gitlab/profiler.rb @@ -97,7 +97,7 @@ module Gitlab attr_reader :load_times_by_model, :private_token def debug(message, *) - message.gsub!(private_token, FILTERED_STRING) if private_token + message = message.gsub(private_token, FILTERED_STRING) if private_token _, type, time = *message.match(/(\w+) Load \(([0-9.]+)ms\)/) diff --git a/lib/gitlab/quick_actions/substitution_definition.rb b/lib/gitlab/quick_actions/substitution_definition.rb index 2f78ea05cf0..0fda056a4fe 100644 --- a/lib/gitlab/quick_actions/substitution_definition.rb +++ b/lib/gitlab/quick_actions/substitution_definition.rb @@ -17,8 +17,9 @@ module Gitlab return unless content all_names.each do |a_name| - content.gsub!(%r{/#{a_name} ?(.*)$}i, execute_block(action_block, context, '\1')) + content = content.gsub(%r{/#{a_name} ?(.*)$}i, execute_block(action_block, context, '\1')) end + content end end |