From eb5fea40a404e829f00552859ae1b206728d99d7 Mon Sep 17 00:00:00 2001 From: Bart de Water Date: Sat, 28 Jul 2018 17:37:17 -0400 Subject: Enable Start/EndWith and RegexpMatch cops In cases where the MatchData object is not used, this provides a speed-up: https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end --- actioncable/Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actioncable') diff --git a/actioncable/Rakefile b/actioncable/Rakefile index 226d171104..fb75d14363 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -57,7 +57,7 @@ namespace :assets do end print "[verify] #{file} is a UMD module " - if pathname.read =~ /module\.exports.*define\.amd/m + if /module\.exports.*define\.amd/m.match?(pathname.read) puts "[OK]" else $stderr.puts "[FAIL]" -- cgit v1.2.3