class A
def initialize
print "Hello! "
end
end
class B < A
def initialize(name)
super
print "My name is #{name}!"
end
end
test = B.new("Fred")
And I get
wrong number of arguments (1 for 0)
But why? Class B requires one argument, and I am giving it all right. Class A doesn't require any argument, so I am not passing anything through super at all.