From: listrecv@... Date: 2006-03-27T15:38:54+09:00 Subject: Duck typing bunches of strings In my quest to master the fine art of duck typing / overloading, I've run into this probem: How can I identify a collection? The problem is: String mixes in Enumerable, although it ain't a collection. My method wants to act differently if it's given a collection, then if it's just given a single object. I would check .respond_to? :each - but String does, unfortunately. Currently, I'm forced to do .kind_of? Array - but this ain't duck typing. Any ideas? I'd like to separate Array, Hash, Set, etc. etc. from single member objects.