Skip to content

Commit b7f4ce5

Browse files
CyborgMastermgpnd
authored andcommitted
Use regex matching that works for ruby pre 2.4 (ctran#572)
1 parent bb2f573 commit b7f4ce5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def get_index_info(klass, options = {})
362362
end
363363

364364
def get_col_type(col)
365-
if (col.respond_to?(:bigint?) && col.bigint?) || /\Abigint\b/.match?(col.sql_type)
365+
if (col.respond_to?(:bigint?) && col.bigint?) || /\Abigint\b/ =~ col.sql_type
366366
'bigint'
367367
else
368368
(col.type || col.sql_type).to_s

0 commit comments

Comments
 (0)