On Sep 7, 12:06 pm, Nikolay Pavlov <qpa... / gmail.com> wrote: > I have a class with instance method "each" and i want to add variable > aliases for it based on some preferences of the generated objects. class Foo def each p "each called for #{self}" yield end end f1 = Foo.new def f1.some(&block) each(&block) end f1.each{ p 'hi!' } #=> "each called for #<Foo:0x7ffa72cc>" #=> "hi!" f1.some{ p 'aliased' } #=> "each called for #<Foo:0x7ffa72cc>" #=> "aliased" f2 = Foo.new class << f2 alias_method :yow, :each end f2.yow{ p 'simpler' } #=> "each called for #<Foo:0x7ffa6e30>" #=> "simpler"