From: bonefry Date: 2005-10-02T08:51:47+09:00 Subject: Difference between Class.new and construct literals Hi, Sorry if the following is such a n00b question. But I just don't get 1 thing. What is the difference between a = Array.new and a = [] Look at the following code: class Class alias oldNew new def new(*args) puts 'Creating new ' + self.to_s oldNew(*args) end end class Array alias oldInit initialize def initialize(*args) puts 'Initializing Array' oldInit(*args) end end # this works as expected a = Array.new # this doesn't work b = [1,2,3,4] How is the Array constructed when using literals as in `a = []` ? Why hasn't the overriding of those 2 methods worked ?