/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/env ruby a = [0,1,2,3,4,5,2,3] p a.select{|e| a.index(e) != a.rindex(e)}.uniq