title: Adding a directory to $LOAD_PATH (Ruby)
body: <p>I have seen two commonly used techniques for adding the directory of the file currently being executed to the $LOAD_PATH (or $:). I see the advantages of doing this in case you're not working with a gem. One seems more verbose than the other, obviously, but is there a reason to go with one over the other?</p>
  
  <p>The first, verbose method (could be overkill):</p>
  
  <pre><code>$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
  </code></pre>
  
  <p>and the more straightforward, quick-and-dirty:</p>
  
  <pre><code>$:.unshift File.dirname(__FILE__)
  </code></pre>
  
  <p>Any reason to go with one over the other?</p>