Pattern: Redundant sort block
Issue: -
Identifies places where sort { |a, b| a <⇒ b }
can be replaced with sort
.
# bad
array.sort { |a, b| a <=> b }
# good
array.sort
Pattern: Redundant sort block
Issue: -
Identifies places where sort { |a, b| a <⇒ b }
can be replaced with sort
.
# bad
array.sort { |a, b| a <=> b }
# good
array.sort