Project

General

Profile

Feature #4978 ยป 0001-lib-forwardable-Forwardable-instance_delegate-Single.patch

Eregon (Benoit Daloze), 07/06/2011 01:39 AM

View differences:

lib/forwardable.rb
#
def instance_delegate(hash)
hash.each{ |methods, accessor|
methods = [methods] unless methods.respond_to?(:each)
methods.each{ |method|
Array(methods).each{ |method|
def_instance_delegator(accessor, method)
}
}
......
#
def single_delegate(hash)
hash.each{ |methods, accessor|
methods = [methods] unless methods.respond_to?(:each)
methods.each{ |method|
Array(methods).each{ |method|
def_single_delegator(accessor, method)
}
}
    (1-1/1)