Skip to content

Commit

Permalink
Fix: Object#=~ for Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
matsubara0507 committed Aug 27, 2024
1 parent b7e0c41 commit 72e1306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_record/turntable/connection_proxy/mixable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module Mixable

def mixable?(method, *args)
(method.to_s =~ METHODS_REGEXP &&
args.first !~ EXCLUDE_QUERY_REGEXP) ||
(method.to_s == "execute" && args.first =~ QUERY_REGEXP)
!(args.first.is_a?(String) && args.first =~ EXCLUDE_QUERY_REGEXP)) ||
(method.to_s == "execute" && (args.first.is_a?(String) && args.first =~ QUERY_REGEXP))
end
end
end
Expand Down

0 comments on commit 72e1306

Please # to comment.