Skip to content

Instantly share code, notes, and snippets.

@ernie
Created July 18, 2011 18:59
Show Gist options
  • Save ernie/1090334 to your computer and use it in GitHub Desktop.
Save ernie/1090334 to your computer and use it in GitHub Desktop.
Pure-ruby any (quick hack to test something)
module Enumerable
def any?(&block)
self.each do |v|
return true if yield(v)
end
false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment