Skip to content

Instantly share code, notes, and snippets.

Created December 26, 2012 12:20
Show Gist options
  • Save anonymous/4380057 to your computer and use it in GitHub Desktop.
Save anonymous/4380057 to your computer and use it in GitHub Desktop.
list = [1, 2]
[1, 2, 3, 4, 5].each_with_index do |item, index|
if list.include? item
puts "A"
else
puts "B"
end
puts "Common C"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment