title: How to sort array elements in lexicographic order in Ruby
body: <p>I have an array </p>
  
  <pre><code>arr = [[1,2],[2,3],[2,1],[0,1]]
  </code></pre>
  
  <p>I would like them to be in order:</p>
  
  <pre><code>arr = [[0,1],[1,2],[2,1],[2,3]]
  </code></pre>
  
  <p>I would like to use Ruby's <code>sort_by</code> method to do this. How could I sort an array of arrays on two levels in Ruby like this?</p>