From 7083b355a693e2de91aa7bcd7099c1a1690bc756 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Fri, 1 Jun 2018 14:13:47 +0800 Subject: [PATCH] Follow Rubocop for scripts/prune-old-flaky-specs --- scripts/prune-old-flaky-specs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/prune-old-flaky-specs b/scripts/prune-old-flaky-specs index 59f97e833b5..a00a334fd6e 100755 --- a/scripts/prune-old-flaky-specs +++ b/scripts/prune-old-flaky-specs @@ -5,8 +5,9 @@ # gem manually on the CI require 'rubygems' -singleton_class.__send__(:alias_method, :require_dependency, :require) -$LOAD_PATH.unshift(File.expand_path('../lib', __dir__)) +# In newer Ruby, alias_method is not private then we don't need __send__ +singleton_class.__send__(:alias_method, :require_dependency, :require) # rubocop:disable GitlabSecurity/PublicSend +$:.unshift(File.expand_path('../lib', __dir__)) require 'rspec_flaky/report'