Not an answer to your question:

On 7/25/07, Phlip <phlip2005 / gmail.com> wrote:
> Ruby-ists:
>
> We all know this clever idiom to turn a variable that might be an Array into
> one known to be an Array:
>
>   thing = [thing].flatten

I think

   thing = Array(thing)

is more idiomatic.

>> Array(nil)
=> []
>> Array("foo")
=> ["foo"]
>> Array(["foo"])
=> ["foo"]
>> Array([["foo"]])
=> [["foo"]]

It does not accidentally flatten nested arrays, and does not throw a
warning like Object#to_a does