From: nobu@... Date: 2015-12-29T08:31:14+00:00 Subject: [ruby-core:72587] [Ruby trunk - Feature #11919] [Feedback] Passing a module directly Issue #11919 has been updated by Nobuyoshi Nakada. Description updated Status changed from Open to Feedback You can write it as ~~~ruby using Module.new { refine ... ... } ~~~ Or without `Module.new`? ~~~ruby using do refine ... ... end ~~~ ---------------------------------------- Feature #11919: Passing a module directly https://bugs.ruby-lang.org/issues/11919#change-55839 * Author: Tsuyoshi Sawada * Status: Feedback * Priority: Normal * Assignee: ---------------------------------------- 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 ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: