title: How to randomise upper/lower case of a string in Ruby?
body: <p>I want to transform <code>'abcdef'</code> into <code>'aBCdeF'</code> or <code>'AbCDEF'</code> or any other random combination of lower and upper case characters. I need to use this with any given string. I am aware of <code>String</code>'s <code>#upcase</code>, <code>#swapcase</code>, <code>#capitalize</code> etc., but I don't think there is a built-in method for doing what I want. The best I came up with is something like:</p>
  
  <pre><code>'abcdef'.chars.map { |c| c.send [:upcase, :downcase][rand 2] }.join
  </code></pre>
  
  <p>Any better ideas?</p>