Skip to content

Instantly share code, notes, and snippets.

@caius
Created October 8, 2011 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caius/1272622 to your computer and use it in GitHub Desktop.
Save caius/1272622 to your computer and use it in GitHub Desktop.
%w(a b c).each do |e|
break if e == "b"
puts e
end
# >> a
%w(a b c).each do |e|
next if e == "b"
puts e
end
# >> a
# >> c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment