Eric Mahurin said: > Thanks. I assumed that the StringIO class inherited from the > IO class since it has all of the same methods. So the proper > Ruby style is to use respond_to? instead of kind_of? to see > what "type" your arguments are? The common Ruby style is to not check at all, but just send the messages needed to get the job done. If the object is inappropriate, Ruby will catch it and let you know what it didn't like. -- -- Jim Weirich jim / weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)