require 'backports/tools/make_block_optional' Backports.make_block_optional Array, :each_index, :test_on => [42]