    # File lib/core/facets/proc/to_method.rb, line 16
      def to_method(object, name=nil)
        ##object = object || eval("self", self)
        block, time = self, Time.now
        method_name = name || "__bind_#{time.to_i}_#{time.usec}"
        begin
          object.singleton_class.class_eval do
            define_method(method_name, &block)
            method = instance_method(method_name)
            remove_method(method_name) unless name
            method
          end.bind(object)
        rescue TypeError
          object.class.class_eval do
            define_method(method_name, &block)
            method = instance_method(method_name)
            remove_method(method_name) unless name
            method
          end.bind(object)
        end
      end