×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Ruby
Posted by: Solr Trovaprezzi
Added: Dec 7, 2015 2:11 PM
Views: 20
Tags: array ruby nil
  1.  ['value1', 'value2', nil, 'value4', nil].compact
  2.  #=> ["value1", "value2", "value4"]
  3.