I was tracking down why Bundler writes config key-value pairs as binary data and tracked down the problem to be specific to Psych since that's what Bundler uses when available.
I might be missing something, but I don't understand why ascii encoded strings are dumped as binary data:
>> require 'psych'
>> s = "vendor"
>> s.encoding # => <Encoding:ASCII-8BIT>
>> Psych.dump(s) # => "--- !binary |-\n dmVuZG9y\n"
Is that how it's supposed to work? If so, there's an issue with Bundler because when reading in config values it simply does not work. I'm using MRI 1.9.3-p392 on OSX.
"ASCII-8BIT" means that the string encoding is unknown. Since YAML is supposed to be unicode, there is no way for us to know how to convert the string to unicode since the encoding is unknown. Since Psych cannot transcode the string to UTF8, then it saves it as binary.