From: Andrew Johnson Date: 2007-04-06T00:47:44+09:00 Subject: Re: Redefining initialize while staying -w clean Daniel Berger wrote: > Hi all, > > Is it possible to redefine initialize and stay -w clean? In win32-file- > stat, I've redefined initialize to suit my needs for MS Windows. > > If I do "undef_method(:initialize)" and run with -w, I'll get: > > "warning: undefining `initialize' may cause serious problem". > > However, if don't do that, I get "warning: method redefined; > discarding old initialize". Try aliasing the method before redefining it: alias :old_init :initialize def initialize() end regards, andrew -- Posted via http://www.ruby-forum.com/.