When I do the following in Ruby 1.9.3 (also JRuby, Rubinius...), it works as expected:
enum = [1,2,3,4,5].each
#=> #<Enumerator: [1, 2, 3, 4, 5]:each>
enum.next
#=> 1
If I try the same thing on Ruby 1.8.7 with backports, the following thing happens:
require "backports"
enum = [1,2,3,4,5].each
#=> #<Enumerable::Enumerator:0x1057fd400>
enum.next
#=> ArgumentError: wrong number of arguments (1 for 0)
What am I doing wrong here? I don't give any arguments as far as I know.
Clarification: It does not happen without back ports