7stud -- wrote:
> class A
>   def foo
>     puts "foo from class A"
>   end
> 
>   def initialize
>     class << self
>       include Redef
>     end
>   end
> 
> end

Thanks for the note 7stud. I think you can also write the above example 
as:

class A
  def foo
    puts "foo from A"
  end

  def initialize
    extend Redef
  end
end
-- 
Posted via http://www.ruby-forum.com/.