

def test_each_with_index(self, space):
    w_res = space.execute('\n        result = []\n        (5..10).each_with_index do |n, idx|\n          result << [n, idx]\n        end\n        return result\n        ')
    assert (self.unwrap(space, w_res) == [[5, 0], [6, 1], [7, 2], [8, 3], [9, 4], [10, 5]])

dataset/ETHPy150Open topazproject/topaz/tests/modules/test_enumerable.py TestEnumberable.test_each_with_index/original