title: Can a collection.inject([]){...} return [ ] (empty) if nil?
body: <p>The following method returns an empty array if there is no result to .where() query. How would this be achieved with an <code>inject([]){ |memo, value| memo &lt;&lt; value }</code>? By default, <code>inject([])</code> returns <code>nil</code> if no result is found to <code>.where()</code> query.</p>
  
  <pre><code>def jobs_it_can_be_contacted_for
   jobs = []
   user_jobs.where("user_jobs.user_job_type IN (?)", ['job', 'represent']).each do |user_job|
    jobs &lt;&lt; user_job.job unless user_job.job == Job.unknown
   end
   jobs
  end
  </code></pre>