Sha256: 5565d74dbaa5b9670438448c21a268f282d52d9f583e430dcea6ae72ce041300
Contents?: true
Size: 178 Bytes
Versions: 10
Compression:
Stored size: 178 Bytes
Contents
class Array def flatten_once inject([]) { |result, elem| elem.is_a?(Array) ? result + elem : result << elem } end def flatten_once! replace(flatten_once) end end
Version data entries
10 entries across 10 versions & 1 rubygems