title: Find combinations in Ruby that are less than a certain number
body: <p>Say I have an array [1,2,3] and I want every combination of these numbers that don't exceed 4.  So I would have [1,2,3].someMethod(4) and it would give me:</p>
  
  <pre><code>[1,1,1,1]
  [1,1,2]
  [1,3]
  [2,2]
  </code></pre>
  
  <p>So far I have:</p>
  
  <pre><code>(1..4).flat_map{|size| [1,2,3].repeated_combination(size).to_a }
  </code></pre>
  
  <p>but this gives me every possible combinations, including the ones that exceed my given limit. Is there an good way to either only get combinations that add up to my limit?</p>