On Jan 7, 2008 1:38 PM, Peter Bailey <pbailey / bna.com> wrote:

> Yes. Thanks. It's just that I never knew that String#[] even existed.
> It's a great tool.

For the record, I've never used it and had to look it up myself after
reading this thread :-)

If you really wanted to, you could write an Enum method that would
traverse the Enum object and try its best to coerce the contained
objects into other objects (like a to_f, for example).  It might make
for a good little practice "golf" game -- and someone else probably
already has done it -- but it could be useful...

['a', 1, 'b', [my_object, 'c', 5]].to_f
=> [nil, 1.0, nil, [nil, nil, 5.0]]

Todd