Ruby

Ruby

Made by DeepSource

Use size instead of count RB-PR1020

Performance
Major
Autofix

size should be preferred over count. Read more here.

Bad practice

[1, 2, 3].count
{a: 1, b: 2, c: 3}.count

Recommended

[1, 2, 3].size
{a: 1, b: 2, c: 3}.size
[1, 2, 3].count { |e| e > 2 }