Objetos retornando em ordem alfabética em rubi

[p1, p2, p3, p4].sort_by { |p| [p.fname, p.lname] }
Naughty Newt