Is there anything more idiomatic than the following?
foo.class == String
A more duck-typing approach would be to say
foo.respond_to?(:to_str)
to_str indicates that an object's class may not be an actual descendant of the String, but the object itself is very much string-like (stringy?).
to_str