Shopify/ruby — pull request #5 by csfrancis (2014-07-16 00:08:34+00:00)
Title: Optimize any? object allocations for Array and Hash

@Shopify/webscale /cc: @fw42

I just couldn't let this go. This is a replacement for #4 that uses @charliesome's suggestion to optimize Array and Hash specifically.

Because :us: patching allows Rubby developers to override `#each` (and I'm sure someone somewhere has done this), this optimization preserves `any?` semantics by ensuring that the Array/Hash `#each` implementation hasn't been overridden.