From: ruby ismyname Date: 2012-04-11T10:44:38+09:00 Subject: less absolutely horrible way to make sure array 1 only contains elements from array 2? @selections = [] sane = 0 while sane == 0 do print "Make selections: " myselections = gets.chop.split(" ") myselections.each do |path| @selections.push(path) end @selections.each do |selection| choices.each do |choice| if choices == selections then sane +=1 end if sane != @selections.length then puts "One of the selections is not available" sane = 0 @selections = [] end end end end I need to make sure that myselections only contains elements from choices, includes? doesn't work because it allows for partial matches. This works but it looks absolutely horrible. -- Posted via http://www.ruby-forum.com/.