Ruby Developer Question:
Download Job Interview Questions and Answers PDF
Tell me what is the difference between calling super() and super call?
Answer:
☛ super(): 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.
☛ super call: 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 don’t match what the parent is expecting.
☛ super call: 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 don’t match what the parent is expecting.
Download Ruby Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain how you can run Rails application without creating databases? | What is the Notation used for denoting class variables in Ruby? |