Hi,

In message "[ruby-talk:14471] Re: Overloading Constructors."
    on 01/05/01, "Florian G. Pflug" <fgp / phlo.org> writes:

|If the c-extension does not call initialize from their "new" method, would
|it be possible to overcome this without changing the extension by
|overloading the "new" method in my derived class instead of overloading the
|"initialize" method?

Invoke "initialize" implicitly.
Here's an example:

  require "mysql.o"
  class DbConnection < Mysql
    def DbConnection.new(*args)
      conn = super(*args)
      conn.initialize(*args)
      return conn
    end
    def initialize(host, db, user, pass)
      print "In Constructor\n"
    end
  end
  con = DbConnection.new("localhost","rubytest","root", "") 


							matz.