From: James Tucker Date: 2010-12-06T12:15:53+09:00 Subject: [ruby-core:33587] Re: [Ruby 1.9-Feature#4085][Open] Refinements and nested methods On Dec 4, 2010, at 5:37 PM, Yukihiro Matsumoto wrote: > Hi, > > I am neutral about local rebinding. It is useful sometimes (as > someone has pointed out in this thread). At the same time, I agree > with you that performance impact is a huge negative factor against > local rebinding. We need more input. Dave, what do you think? > Anyone else? > > matz. I don't think it's just performance, it's debugging too. If something fails due to a data error introduced mid-stack due to an unexpected refinement then you have to walk up the stack checking to see what refinements are used. This means I can't use irb with a loaded environment and reflection anymore. I have to use a debugger and walk up frames reflecting on the current state of the world. At best you can add the refinement to the backtrace (I have no idea if this is done already? - sorry haven't been following in detail). This will only help if the errored refinement method is actually in the stack, if it isn't you have to walk around odd places in the program / libraries being sure that you're clear what refinements are where. I'm struggling to see how debugging this is any easier than debugging monkey patching?