Skip to content

Commit

Permalink
Use RegExp#match? for performance and clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Dec 13, 2024
1 parent fcd1ba8 commit c6f9f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/support/matchers/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def matches?(table)
SELECT prosrc FROM pg_catalog.pg_proc WHERE proname = ?
SQL

!(source =~ @regexp).nil?
@regexp.match?(source)
end

def failure_message
Expand Down

0 comments on commit c6f9f60

Please # to comment.