Examveda
Examveda

What is memoization in Ruby?

A. Evaluating code at runtime based on user input

B. Creating anonymous functions that can be called later

C. Dynamically defining methods based on certain conditions

D. Caching the return value of a method for future invocations

Answer: Option D


This Question Belongs to Ruby Programming >> Advanced Topics In Ruby

Join The Discussion

Related Questions on Advanced Topics in Ruby

What is a singleton class in Ruby?

A. A class that can have only one method

B. A class that is used to define methods for a single object

C. A class that can have only one subclass

D. A class that can have only one method