1 unless :test.respond_to?(:to_proc)
3 # Turns the symbol into a simple proc, which is especially useful for enumerations. Examples:
5 # # The same as people.collect { |p| p.name }
6 # people.collect(&:name)
8 # # The same as people.select { |p| p.manager? }.collect { |p| p.salary }
9 # people.select(&:manager?).collect(&:salary)
11 Proc.new { |*args| args.shift.__send__(self, *args) }