djberg96/win32-dir — pull request #4 by joshcooper (2013-07-24 06:02:40+00:00)
Title: Return ascii_compatible junction path

Previously, calling `Dir.read_junction` would return a `UTF-16LE` encoded
string, which would cause failures when combining with `File.join`:

C:\> ruby -rwin32/dir -e "p File.join(Dir.read_junction('c:/to'), 'a')"
-e:1:in `join': string contains null byte (ArgumentError)

For the same reasons as mentioned in d92e3b4e7f.

This commit modifies the `read_junction` method to return the junction path
encoded in the default external encoding, similar to what is done for
`Dir.getwd` and the CSIDL constants.