Leading substrings exercise
What you're looking for is known as a "scan" in functional programming.  Surprisingly, ruby's Enumerable, which is where this method belongs (since what you're doing is not, ultimately, specific to strings), does not provide a scan method or its equivalent.

But we can write one easily enough:

module Enumerable
  def scans
    reduce([]) {|m,x| m &lt;&lt; (m.last || []) + [x]}
  end  
end


Now we have a general purpose method which we can use like so:

[9] pry(main)&gt; (1..5).to_a.scans
=&gt; [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5]]


Your original problem now becomes a simple delegation to scans:

[14] pry(main)&gt; 'abc'.split('').scans.map(&amp;:join)
=&gt; ["a", "ab", "abc"]