What does the `super` keyword do when called inside a method in Ruby?
A. Calls the superclass method with the same name
B. Calls the subclass method with the same name
C. Calls the method again recursively
D. None of the above
Answer: Option A
Related Questions on Methods in Ruby
What is the syntax for defining a method in Ruby?
A. def method_name
B. method method_name
C. function method_name
D. define method_name
What does the return keyword do in Ruby methods?
A. Exits the method
B. Continues the method
C. Restarts the method
D. None of the above
In Ruby, how do you define default parameter values for a method?
A. def method(param = value)
B. def method(param: value)
C. def method(param = default)
D. def method(param => value)
Join The Discussion