#!/usr/bin/ruby a = Array.new a << 8 a << 7 puts '---' puts a puts '---' a.delete_if { |i| i == 7 } puts '---' puts a puts '---'