Skip to content

Instantly share code, notes, and snippets.

/.rb Secret

Created November 30, 2014 00:31
Show Gist options
  • Save anonymous/f8b54dfd34c29d5a5c3e to your computer and use it in GitHub Desktop.
Save anonymous/f8b54dfd34c29d5a5c3e to your computer and use it in GitHub Desktop.
class Array
def each_with_index_starting_at(start_index)
self.each_with_index do |item, index|
yield item, index + start_index
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment