rubinius/rubinius — pull request #1463 by tamc (2011-12-21 21:28:51+00:00)
Title: Using Rubinius.single_block_arg in some Enumarable and Enumerator methods

Changed Enumerable#inject, Enumerator#each_with_index and Enumerator#with_index to use Rubinius.single_block_arg, which should fix #1457

This is a reopened pull request, that merges my changes into a single commit.

In 1.9 mode, if each_with_index was followed by inject or by each_with_index again, Rubinius gave a different answer to MRI 1.9, MRI 1.8 and Rubinius 1.8 mode. Reported as issue #1457.

To fix this, I changed Enumerable#inject, Enumerator#each_with_index and Enumerator#with_index to use `Rubinius.single_block_arg`

Thanks

Tom