@enebo I closed the old pull request and opened this one to be merged on jruby-1_7 as you asked.
Fixing Enumerator#peek behaviour. When the Enumerator position is alr…
…eady at the end and method peek is called then JRuby was throwing a NullPointerException. But the correct behaviour should be raise a StopIteration.
Thanks Lucas, I should have mentioned that test/externals/ruby1.9 is actually MRI's 1.9 test suite. I committed it anyways but if we ever resync your test will disappear (which I think is fine so long as you open an issue and get this test added to MRI or rubyspecs test suite).
@enebo thanks you very much. I sent a pul request to mri with these tests ruby/ruby#479