> > I'm working in a research
> > project and I need to do some "clever stuff" (that's the thing I can't
> > disclose) to all the Strings. This thing is "different" depending on
> > how strings are composed. All the ways I know for string composition
> > but string interpolation (<<, +, concat, gsub, etc.) can be overridden
> > redefining methods in the string class. I'm looking for a way to
> > intercept the string expansion to do my thing. Does ruby internally
> > call some overridable method to compose the strings used in a
> > interpolation?
>
> Likely but also likely not accessible to pure Ruby code.  But in your
> case (research project) it might be ok to hack the interpreter if you
> need to catch all string interpolations.  Did you look into this yet?

I'll see if I can get away with it. I'll provide a patch to have an
interpolation hook if I manage to implement it.

Thanks,
Aureliano.