delete key if value is equal to an element of an array ruby code example Example: ruby remove element from array by value a = [3, 2, 4, 6, 3, 8] a.delete(3)