Skip to content

Instantly share code, notes, and snippets.

@jasim
Created May 5, 2010 21:26
Show Gist options
  • Save jasim/391462 to your computer and use it in GitHub Desktop.
Save jasim/391462 to your computer and use it in GitHub Desktop.
a=[10,20,30,40,50]
a.each_index {|i| if a[i] > 20
return i
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment