Posts tagged chops

Dec12

The Array function in Ruby

ruby array tricks chops | comments

I've seen code before that do the following:

collection = [ var ].flatten # where var might or might not be an array

This idiom is better expressed using

Continue reading »