Replace Matrix#row_count with Matrix#row_size for ruby version