DEV Community

Discussion on: Understanding Ruby - For vs Each

Collapse
 
baweaver profile image
Brandon Weaver

Line 2 was me forgetting to comment the line. The collection doesn't explicitly need to be an Array, no. Also compare! doesn't need to be explicitly called.

Collapse
 
vgoff profile image
Victor Goff • Edited

Also compare! doesn't need to be explicitly called.

This is true, but it then won't give you the comparison report. So it does not need to be there, it is just a nice to have. Also, not sure how to implicitly call it. To be sure, I did write in the message that it was there to show the comparison report.