Gregory Brown wrote: >>> Array([["foo"]]) > => [["foo"]] > > It does not accidentally flatten nested arrays, and does not throw a > warning like Object#to_a does Ruby is a strongly-typed language that permits you to write interfaces that are as feebly- or strongly-typed (or statically-typed) as you like. If your interface permits one item or a series of similar items, then those nested arrays are not "accidentally" flattened, they are deliberately pushed into your interface's contract. If flattening that deep array and traversing its elements surprises the user, then maybe they shouldn't pass arrays in that they convoluted for some other reason! -- Phlip http://www.oreilly.com/catalog/9780596510657/ ^ assert_xpath http://tinyurl.com/23tlu5 <-- assert_raise_message