Vidyalelo
Ruby Programming · Q13

Enumerators and Iterators in Ruby

Programming · Ruby Programming · question 13

Q13

What does the cycle method do in Ruby enumerators?

A.
Removes duplicate elements from a collection
B.
Sorts elements in a collection
C.
Iterates over each element in a collection indefinitely
Answer
D.
Repeatedly applies a block of code to each element

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board