O
O
Ord EO2021-02-17 03:38:41
ruby
Ord EO, 2021-02-17 03:38:41

How to remove an array with empty elements from an array of arrays in Ruby?

There is such an array with arrays

arr = 
How can I remove all arrays from this array in which at least one element is an empty string?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-02-17
@OrdeO

arr.delete_if{|n| n.include?('')}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question