61. What is the primary difference between module_function and extend self in Ruby? A. module_function makes the specified methods accessible as module methods, while extend self makes them accessible as instance methods B. module_function makes the specified methods private, while extend self makes them public C. module_function creates a new module, while extend self extends the current module D. module_function makes the specified methods singleton methods, while extend self makes them instance methods Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
62. What does the send method in Ruby do? A. It returns a Method object representing the specified method B. It checks if the object responds to the specified method C. It sends a message to the Ruby interpreter to execute a piece of code D. It invokes a method dynamically on an object Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
63. Which Ruby module is commonly used for method delegation? A. Delegator B. Delegate C. Forwardable D. Proxy Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
64. What is the purpose of the const_missing method in Ruby? A. It is called when a constant is accessed that is already defined B. It is called when a constant is accessed that is not defined C. It is called when a constant is defined that is not accessed D. It is called when a constant is accessed that is already defined Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
65. What is a "magic comment" in Ruby? A. A comment that is automatically removed during code compilation B. A comment that automatically generates documentation for the code C. A special comment that affects the behavior of the Ruby interpreter D. A comment with a mystical or cryptic meaning Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
66. In Ruby, what is the purpose of the Module#prepend method? A. It includes a module in the inheritance chain after the class itself B. It extends a module to add new functionality C. It creates a copy of the module and appends it to the end of the inheritance chain D. It includes a module in the inheritance chain before the class itself Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
67. What does the "splat" operator (*) do when used in method definitions in Ruby? A. It allows a method to accept a variable number of arguments as an array B. It repeats a block of code a specified number of times C. It creates a shallow copy of an array or hash D. It performs a bitwise operation on a numerical value Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
68. What is the purpose of the retry keyword in Ruby? A. It resumes execution at the beginning of the block where an exception was rescued B. It re-runs the entire program from the beginning C. It raises an exception if an error occurs during method execution D. It restarts the current iteration of a loop Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
69. What does the super keyword do in Ruby? A. It calls the method of the same name in the current class B. It returns the superclass of the current class C. It calls the method of the same name in the superclass D. It returns the current class as a superclass Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
70. What is a "class variable" in Ruby? A. A variable that is initialized with the value of a constant B. A variable that is shared among all instances of a class C. A variable that is dynamically assigned based on the instance's state D. A variable that is initialized with the value of a constant Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board