
It's really ugly to have to keep repeating File.dirname(__FILE__), so we use a temporary variable, even in the case of a single require. This minimises long "requires" lines and "requires" statements with needing line-breaks, and should make search-and-replace a bit easier if we later want to migrate to __dir__ (Ruby >= 2.0) or require_relative. http://stackoverflow.com/questions/4333286/ruby-require-vs-require-relative-best-practice-to-workaround-running-in-both I've deliberately rejected the pattern: require File.expand_path('../relative/path', __FILE__) because it relies on inconsistent semantics and inconsistent documentation in File.expand_path: http://stackoverflow.com/questions/4333286/ruby-require-vs-require-relative-best-practice-to-workaround-running-in-both#comment34147297_4333552