diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 12:24:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 12:24:38 +0300 |
commit | 898e2cc1dfa88b4ac39cb4b35011f61b37f57b51 (patch) | |
tree | c6524edb6c9a43cccf93be05c36883fde1a53ee4 /lib/gitlab/sherlock | |
parent | b5571e6e22cdacc81f78eff5943d68c8ba220fbb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sherlock')
-rw-r--r-- | lib/gitlab/sherlock/file_sample.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/sherlock/line_profiler.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/sherlock/file_sample.rb b/lib/gitlab/sherlock/file_sample.rb index 604b6df12cc..5d10d8c4877 100644 --- a/lib/gitlab/sherlock/file_sample.rb +++ b/lib/gitlab/sherlock/file_sample.rb @@ -18,7 +18,7 @@ module Gitlab end def relative_path - @relative_path ||= @file.gsub(%r{^#{Rails.root.to_s}/?}, '') + @relative_path ||= @file.gsub(%r{^#{Rails.root}/?}, '') end def to_param diff --git a/lib/gitlab/sherlock/line_profiler.rb b/lib/gitlab/sherlock/line_profiler.rb index 209ba784f9c..52d88f074b7 100644 --- a/lib/gitlab/sherlock/line_profiler.rb +++ b/lib/gitlab/sherlock/line_profiler.rb @@ -45,7 +45,7 @@ module Gitlab require 'rblineprof' retval = nil - samples = lineprof(/^#{Rails.root.to_s}/) { retval = yield } + samples = lineprof(/^#{Rails.root}/) { retval = yield } file_samples = aggregate_rblineprof(samples) |