From 145ec9cca02c32caddc097f371837a450e50297f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Bor=C3=A1k?= Date: Mon, 3 Jun 2024 14:39:01 +0200 Subject: [PATCH] Replace bytesize --- lib/dump_cleaner/cleaners/mysql_shell_table_cleaner.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dump_cleaner/cleaners/mysql_shell_table_cleaner.rb b/lib/dump_cleaner/cleaners/mysql_shell_table_cleaner.rb index 10afe97..dcbfb03 100644 --- a/lib/dump_cleaner/cleaners/mysql_shell_table_cleaner.rb +++ b/lib/dump_cleaner/cleaners/mysql_shell_table_cleaner.rb @@ -84,11 +84,11 @@ def keep_same_record?(record, table_config:) end def warn_on_changed_line_length(orig_line, new_line, id:, record:) - return if orig_line.bytes.length == new_line.bytes.length + return if orig_line.bytesize == new_line.bytesize - warning = "ID: #{id} bytes length changed: #{orig_line.bytes.length} => #{new_line.bytes.length}" + warning = "ID: #{id} bytes length changed: #{orig_line.bytesize} => #{new_line.bytesize}" orig_line.split("\t").each_with_index do |column, i| - warning << "#{column} -> #{record[i]}" if !record[i] || column.bytes.length != record[i].bytes.length + warning << "#{column} -> #{record[i]}" if !record[i] || column.bytesize != record[i].bytesize end Log.warn { warning }