Ruby Quickies #3

The power of “super”

What is the difference between calling super and calling super()?

A call to super invokes the parent method with the same arguments that were passed to the child method. An error will therefore occur if the arguments passed to the child method

Also, a call to super doesn’t match what the parent is expecting.

But a call to super() invokes the parent method without any arguments, as presumably expected. As always, being explicit in your code is a good thing.