Skip to content

Check SizeZeroEmpty

github-actions[bot] edited this page Nov 22, 2024 · 4 revisions

Use the method empty?, instead of checking for size equals to 0. The method empty? is faster.

Non-compliant Code Example

a.size = 0

Compliant Code Example

a.empty?

Note

This page is generated. Any changes made to this page through the wiki will be lost in the future.