Different errors totally mean progress! :) 

This was a tricksy spec. The magical word you were looking for was "yield". The solution that I think is easiest to read is:
  def self.work n = 1
     results = nil
     n.times { results = yield }
     results
  end

self.<method> is a class method. Here's a resource I found that might answer some of your questions, but I'm sure you could Google up some more:
http://www.railstips.org/blog/archives/2009/05/11/class-and-instance-methods-in-ruby/