Skip to content

Instantly share code, notes, and snippets.

@wmoxam
Forked from jasim/gist:391462
Created May 5, 2010 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wmoxam/391464 to your computer and use it in GitHub Desktop.
Save wmoxam/391464 to your computer and use it in GitHub Desktop.
a=[10,20,30,40,50]
i = 0
a.each_index {|i|
break if a[i] > 20
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment