You can consider the relationship between the method Class#newand each class #initialize, which will be implemented more or less as follows:
class Class
def new
instance = allocate()
instance.initialize
return instance
end
end
class Foo
def initialize
end
end
#initialize, #initialize , ( , ).
, Class#new, #initialize . :
class Class
def new (arg1, arg2, &block_arg)
instance = allocate()
instance.initialize(arg1, arg2, &block_arg)
return instance
end
end
class MyClass
def initialize (arg1, arg2, &block_arg)
end
end