title: Right way to pass environment variables to exec shell command
body: <p>I'm using ruby 1.8.7 patch 249. Is the following the best/only way to pass environment variables to a shell command that I need to execute from my ruby program?</p>
  
  <pre><code>fork do       
     ENV['A'] = 'A'
     exec "/bin/bash -c 'echo $A'"
  end
  
  Process.wait
  </code></pre>