From 69cd54051f963b8519a50fde9b41397574bc615b Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Wed, 27 Jul 2022 15:32:36 +0900 Subject: [PATCH] Prefer TEXT to RUBY here for consistency --- spec/rubocop/cop/performance/redundant_match_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/rubocop/cop/performance/redundant_match_spec.rb b/spec/rubocop/cop/performance/redundant_match_spec.rb index 3b5cb49b6b..a72dc4710b 100644 --- a/spec/rubocop/cop/performance/redundant_match_spec.rb +++ b/spec/rubocop/cop/performance/redundant_match_spec.rb @@ -113,10 +113,10 @@ def method(str) end it 'registers an offense and corrects when receiver is a Regexp literal' do - expect_offense(<<~TEXT) + expect_offense(<<~RUBY) something if /regex/.match(str) ^^^^^^^^^^^^^^^^^^ Use `=~` in places where the `MatchData` returned by `#match` will not be used. - TEXT + RUBY expect_correction(<<~RUBY) something if /regex/ =~ str