cask/cask — pull request #240 by syohex (2014-09-14 03:34:06+00:00)
Title: Fix for encoding issue

Decoding by locale.getpreferredencoding is not necessary if `universal_newlines` is True.

I got following error with latest `carton` with Python3.

```
Traceback (most recent call last):
File "/home/syohei/.cask/bin/cask", line 348, in
main()
File "/home/syohei/.cask/bin/cask", line 331, in main
exec_cask(sys.argv[1:])
File "/home/syohei/.cask/bin/cask", line 293, in exec_cask
emacs = get_cask_emacs()
File "/home/syohei/.cask/bin/cask", line 260, in get_cask_emacs
ensure_supported_emacs(emacs)
File "/home/syohei/.cask/bin/cask", line 217, in ensure_supported_emacs
if not is_supported_emacs(emacs):
File "/home/syohei/.cask/bin/cask", line 202, in is_supported_emacs
return get_emacs_version(emacs) >= MIN_EMACS_VERSION
File "/home/syohei/.cask/bin/cask", line 182, in get_emacs_version
version = VERSION_RE.search(stdout.decode(
AttributeError: 'str' object has no attribute 'decode'
```

`subprocess` module document says

```
If universal_newlines is True, these file objects will be opened as text streams
in universal newlines mode using the encoding returned by locale.getpreferredencoding(False).
```

https://docs.python.org/3/library/subprocess.html