Sorry for creating the confusions:-

Here I tried once more to explain what I was looking for:

class Foo
  def test
    p "hi"
  end
end
foo = Foo.new
foo.test # => "hi"
Foo.define_method(:test){p "hello"}
#  private method `define_method' called for Foo:Class (NoMethodError)

Any method is there to re-define the method `test` without re-opening 
the class in runtime?

Thanks

-- 
Posted via http://www.ruby-forum.com/.