Skip to content

Files

Latest commit

 

History

History
21 lines (13 loc) · 381 Bytes

Performance-RedundantSortBlock.md

File metadata and controls

21 lines (13 loc) · 381 Bytes

Pattern: Redundant sort block

Issue: -

Description

Identifies places where sort { |a, b| a <⇒ b } can be replaced with sort.

Examples

# bad
array.sort { |a, b| a <=> b }

# good
array.sort

Further Reading