title: Ruby: Split, then remove leading/trailing whitespace in place?
body: <pre><code>things = "one thing, two things, three things, four things"
  </code></pre>
  
  <p>Given this input, how do I split a string by a comma and then trim the whitespace around it in place? Resulting in:</p>
  
  <pre><code>things = ["one thing", "two things", "three things", "four things"]
  </code></pre>
  
  <p>Currently I have this:</p>
  
  <pre><code>things = things.to_s.tr("\n\t", "").strip.split(/,/)
  </code></pre>
  
  <p>This does most of what I want it to do, except removing the leading/trailing whitespace when it splits on the comma. What's the best way to achieve this? I'd like to do it as part of this expression, instead of assigning the above result to a separate array and iterating over that.</p>