Hope this helps:

 >> require "enumerator"
=> true
 >> module Enumerable
 >>   def inject_with_index(*args, &block)
 >>     enum_for(:each_with_index).inject(*args, &block)
 >>   end
 >> end
=> nil
 >> ("A".."D").inject_with_index("") do |str, (let, i)|
?>   i % 2 == 0 ? str += let : str
 >> end
=> "AC"

James Edward Gray II