In message "[ruby-talk:12157] Override ".""
    on 01/03/07, jonas <jonas.bulow / servicefactory.se> writes:
>Maybe I'm missing the point but what is wrong with having "." as
>syntactic sugar for invoking send on an object?

Maybe that makes ruby slow.  

The following mimics what you want:

  #class Klass
  #  def send(aSym, *args)
  #    puts "send: #{aSym}"
  #    __send__(aSym, args)
  #  end
  #  def hello(*args)
  #    "Hello " + args.join(' ')
  #  end
  #end

  set_trace_func lambda{|event, file, line, id, bind, klass|
    if event == "call" && klass == Klass
      puts "call: #{id}"
    end
  }

  class Klass
    def hello(*args)
      "Hello " + args.join(' ')
    end
  end

  k = Klass.new
  puts k.hello("plopp")

  class Foo
    def hello() end
  end

  puts Foo.new.hello  #=> nil

-- Gotoken