Skip to content

Commit

Permalink
Prefer TEXT to RUBY here for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Jul 27, 2022
1 parent 1de7e6e commit 69cd540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/rubocop/cop/performance/redundant_match_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 69cd540

Please sign in to comment.