From: "Joseph E. Savard" Date: 2010-08-26T23:03:57+09:00 Subject: Re: Initialise I see your point. I would follow the language. Issues with other coders and such will arise.. Alias for Initialize doesn't fit. 1. Initialize is a private method. 2. The Object inherently calls Initialize upon creation. When the object is instantiated its calls Initialize. Alias is created by this time, and there is no no need to call it after creation. 3. Aliasing in the way you are attempting is calling it a second time. Its probably better to follow the language. Just a quick irb session: irb(main):001:0> class Joe irb(main):002:1> alias :initialise :initialize irb(main):003:1> def initialize irb(main):004:2> print "where you going with that gun in your hand?" irb(main):005:2> @gun = 0 irb(main):006:2> end irb(main):007:1> end => nil irb(main):008:0> jimi = Joe.new where you going with that gun in your hand?=> # irb(main):009:0> jimi.initialise NoMethodError: private method `initialise' called for # from (irb):9 > From: Iain Barnett > Reply-To: > Date: Thu, 26 Aug 2010 22:04:22 +0900 > To: ruby-talk ML > Subject: Initialise > > Hi all, > > Being English and able to spell proper like, innit, I find I'm creating a lot > of stupid errors by writing `def initialise` a lot. I had the bright idea of > making an alias to stop this transatlantic turmoil, but I've no idea where to > put it. Everything I've looked up boils down to "don't worry, initialize is > sort of magic behind the scenes, just call new..." > > I tried this: > > class Object > alias :initialise :initialize > end > > > but it didn't work. Is this possible, or do I have to start writing like the > lead singer from Radiohead sings? > > Regards, > Iain