<p>I'd really like to handle this without monkey-patching but I haven't been able to find another option yet.</p>

<p>I have an array (in Ruby) that I need to sort by multiple conditions.  I know how to use the sort method and I've used the trick on sorting using an array of options to sort by multiple conditions.  However, in this case I need the first condition to sort ascending and the second to sort descending.  For example:</p>

<pre><code>ordered_list = [[1, 2], [1, 1], [2, 1]]
</code></pre>

<p>Any suggestions?</p>

<p>Edit:  Just realized I should mention that I can't easily compare the first and second values (I'm actually working with object attributes here).  So for a simple example it's more like:</p>

<pre><code>ordered_list = [[1, "b"], [1, "a"], [2, "a"]]
</code></pre>

How about:
```
```
ordered_list = [[1, "b"], [1, "a"], [2, "a"]]
ordered_list.sort! do |a,b|
  [a[0],b[1]] <=> [b[0], a[1]]
end
```
```