ExamVeda
Login
Home
31
What is the main difference between instance_eval and class_eval in Ruby?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
32
What is the purpose of the prepend method in Ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
33
In Ruby, what does it mean to "freeze" an object?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
34
What is the purpose of the BasicObject class in Ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
35
Which method is commonly used to convert an object into its string representation in Ruby?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
36
What is the purpose of the Object#tap method in Ruby?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
37
What does the term "lazy evaluation" refer to in Ruby?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
38
What is the purpose of the Enumerable#reduce method in Ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
39
What is the significance of using the include? method in Ruby's Enumerable module?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
Which method is used to convert a hash into an array of key-value pairs in Ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board