Handle arguments
The use of super
is particular in Ruby. Arguments are passed implicitly when nothing is specified. You must then explicitly use parentheses to specify the arguments, even if there are none!
But that’s not all, it’s more complicated with blocks. Whether or not parentheses are present, the block is passed. If you don’t want it, you have to explicitly put &nil
.
Link to Ruby documentation for super
.