Project

General

Profile

Feature #11919

Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

Refinement requires a named module: 

 ~~~ruby 
 

     module MyRefinement 
   
       refine ... 
   
       ... 
 
     end 

 

     using MyRefinement 
 ~~~ 

 but often (but not always), refinements are called by the `using` command only in once in a single file, and should not need to be named in such case. Also, the purpose of refinement is to not pollute classes with methods. Necessity to define a module and polluting the name space looks to me to go against this idea. 

 I would like to do: 

 ~~~ruby 
 


     using Module.new do 
   
       refine ... 
   
       ... 
 
     end 
 ~~~ 

Back