Skip to content

Instantly share code, notes, and snippets.

@bdimcheff
Created January 26, 2009 04:39
Show Gist options
  • Save bdimcheff/52706 to your computer and use it in GitHub Desktop.
Save bdimcheff/52706 to your computer and use it in GitHub Desktop.
def each_pair(&block)
each_with_index do |word, index|
yield word + self[index + 1]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment