• V
    Replace x.sort_by!.select! with x.select!.sort_by! · 8ee785a1
    Viktar Basharymau 提交于
    The latter has the same speed as the former in the worst case
    and faster in general, because it is always better to sort less items.
    
    Unfortunately, `routes.select!{...}.sort_by!{...}` is not possible here
    because `select!` returns `nil`, so select! and sort! must be done
    in two steps.
    8ee785a1
router.rb 3.7 KB