Hi,

In message "Re: [ruby-core:48828] Re: [ruby-trunk - Feature #4085] Refinements and nested methods"
    on Sun, 4 Nov 2012 08:42:11 +0900, Akira Matsuda <ronnie / dio.jp> writes:
|
|Playing with refinements after talking with Charlie, I found
|refinements are not very much attractive feature without module_eval.
|I think I do understand the down sides Charlie described.
|And I'm sure people will abuse this refinements + module_eval
|technique if they are allowed to, because it just looks cool.

I agree. Even though there's chance to make program behavior
unpredictable, extending behavior in block with refinements would
enhance the possibility of expressiveness.  ActiveRecord example is
one of them.  As far as I understand, Charlie came up with an idea to
resolve refinements at the first method invocation.  If the idea is a
right one, we can allow such cases.

But I am not sure allowing refinement application in blocks should be
done by module_eval or not.  Generating anonymous module for every
block execution sound inefficient.

							matz.