0042 Super

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!

0042-super_1.png

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.

0042-super_2.png

Link to Ruby documentation for super.