From: Eric Hodel Date: 2004-11-13T04:41:23+09:00 Subject: Re: warning: redefining Object#initialize may cause infinite loop On Nov 11, 2004, at 4:23 PM, Stu wrote: > > Is there anyway I can supress this warning? > > I tried setting $VERBOSE = FALSE before then > back to TRUE after my bit of code but nothing... > > I seem to unconciously miscode initialize to initialise. > every. single. time. > > so I did > > class Object > def initialize > initialise > end > end Redefine Object.new, not Object#initialize # untested code below, but I think it is OK. class Object def self.new(*args, &block) obj = allocate if obj.respond_to? :initialise then obj.initialise else obj.initialize end return obj end end