Pit Capitain wrote:
> 2008/2/25, Clifford Heath <no / spam.please.net>:
>> Phlip wrote:
>>  > I want .inspect, or whatever, outside my module, to behave normally. But if
>>  > you inspect a string while my module is above you on the call stack, I get
>>  > my hotwired version of .inspect.
>>  > Does anyone have a Ruby Hack which does that yet? How hard would it be?
>>
>>  It can't be done in Ruby. (...)
> 
> I would be *very* careful with sentences like this.

You can do the special case that Phlip described. You can't do the
general thing which he was exemplifying without doing stupid things
like inspecting caller. I've also done quite a bit of deep metaprogramming
in Ruby, and what he wants (as opposed to his simple example) can't
sensibly be done, and probably shouldn't be anyway. Caller sensitivity
violates POLS.