From: Markus Fischer Date: 2009-05-27T19:25:04+09:00 Subject: Re: String representing relative file name, adding (meta) data? Brian Candler wrote: > Some Ruby methods call to_str implicitly when they expect a String, so > try that. O_O ! That a surprising thing for a beginner. With that information and searching for "ruby to_s vs to_str" reveals some useful background. One just has to grasp this. > This lets you pick and choose the ones which you wish to expose. > Otherwise, you can delegate all unknown methods like this: > > def method_missing(m, *args, &blk) > @name.send(m, *args, &blk) > end That's wonderful, I integrated this and now the rest of my code is less cluttered and suddenly the class works in cases I haven't thought of. Very nice, thank you! - Markus