Skip to content

Instantly share code, notes, and snippets.

@solomon081
Created June 10, 2012 15:12
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 solomon081/2906141 to your computer and use it in GitHub Desktop.
Save solomon081/2906141 to your computer and use it in GitHub Desktop.
double_each
class Array
def double_each other, &block
self.each_with_index do |item, index|
yield [item, other[index]]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment