carlhuda/bundler — pull request #2054 by richo (2012-08-11 03:49:16+00:00)
Title: Short circuit config loading if config file is the null device

## What this is

Recently, I was working with some subprojects on heroku and the need to not inherit the config from the parent arose.

The only way I could find to do this was to set `BUNDLER_CONFIG` to `/nonexistent` which is bad for two reasons:

* It might exist
* It's definitely not writable

Using `/dev/null` would make much more sense, but as the EOF it returns is not valid YAML, psych flips out immediately when trying to read it.

This fairly kludgy patch causes it to emit the "non exist" behaviour if you pass it /dev/null, which should fix most of these issues without breaking backwards compatability.

One thing I couldn't find was whether or not ruby has a variant of python's `os.nulldev` which platform agnostically returns the null device.