From: Stefano Crocco Date: 2007-03-13T20:51:02+09:00 Subject: Re: BigDecimal bug? Alle marted� 13 marzo 2007, Mark Somerville ha scritto: > I don't understand why I need > to wrap the alias_method inside class << self. Can anyone explain it to me? alias_method works for instance methods (i.e, a method of instances of class BigDecimal). You're aliasing a class method (new), that is an instance method of the class BigDecimal. To do so, you should enter a scope where self is not the class BigDecimal, but BigDecimal's class. This way, new is seen as an instance method (i.e. a method of instances of the class of BigDecimal, i.e. of BigDecimal). This is what you do with the class << self construct. I hope this explaination makes sense (if it doesn't, tell me and I'll try to clarify) Stefano