From: Love U Ruby Date: 2013-07-23T15:51:18+09:00 Subject: Re: How can we create instance method and class methods at runtime in ruby? 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/.