Skip to content

Commit 7bcfe84

Browse files
authored
Merge pull request rails#27228 from kamipo/follow_up_27126
Fix CI failure due to missing `Regexp#match?`
2 parents f39779f + 9f63ba1 commit 7bcfe84

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ def initialize_type_map(m) # :nodoc:
692692

693693
def register_integer_type(mapping, key, options) # :nodoc:
694694
mapping.register_type(key) do |sql_type|
695-
if /\bunsigned\b/.match?(sql_type)
695+
if /\bunsigned\b/ === sql_type
696696
Type::UnsignedInteger.new(options)
697697
else
698698
Type::Integer.new(options)

activerecord/lib/active_record/connection_adapters/mysql/column.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def blob_or_text_column?
2020
end
2121

2222
def unsigned?
23-
!/\A(?:enum|set)\b/.match?(sql_type) && /\bunsigned\b/.match?(sql_type)
23+
/\A(?:enum|set)\b/ !~ sql_type && /\bunsigned\b/ === sql_type
2424
end
2525

2626
def case_sensitive?

0 commit comments

Comments
 (0)