From: Shugo Maeda Date: 2010-12-06T14:12:03+09:00 Subject: [ruby-core:33589] Re: [Ruby 1.9-Feature#4085][Open] Refinements and nested methods Hi, 2010/12/5 Yukihiro Matsumoto : > 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? I believe we should not support local rebinding. I guess local rebinding is not designed for refinements of classes which have many clients like built-in classes. With local rebinding, when we refine a built-in class such as String, we have to take care carefully not to break existing code. This means that, it's ridiculous to use the following refinement with local rebinding. module MathN refine Fixnum do def /(other) quo(other) end end end My intention is to bring modularity into monkey patching, not to bring extensibility. We already have enough extensibility in Ruby. -- Shugo Maeda