DEV Community

Discussion on: What's the Craziest Question You Ever Asked on Stack Overflow?

Collapse
 
fluffy profile image
fluffy

For what it's worth, there is some merit in making a copy of the list, if you don't want to mutate the list that's been passed in at a later time for some reason. I'm not versed in ruby and I assume it does have a list copy operator of some sort, but there's at least merit in what you were doing, if not the mechanism. :)