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 --- tasks/release.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/release.rb b/tasks/release.rb index cbda9a3798..f13342b90c 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -89,7 +89,7 @@ npm_version = version.gsub(/\./).with_index { |s, i| i >= 2 ? "-" : s } if File.exist?("#{framework}/package.json") Dir.chdir("#{framework}") do - npm_tag = version =~ /[a-z]/ ? "pre" : "latest" + npm_tag = /[a-z]/.match?(version) ? "pre" : "latest" sh "npm publish --tag #{npm_tag}" end end -- cgit v1.2.3