defunkt/fakefs — pull request #203 by jomunoz (2013-10-04 17:15:48+00:00)
Title: Binary read fix

We found this bug while using FakeFS with Rubyzip, ruby size would fail while reading a file it just created. The reason is that the encoding was not binary even if the read mode was set to binary ('rb'), because StringIO ignores the mode param.
So the fix checks if mode has been setup to binary, and if so forces the encoding to the later.
This fix works only for ruby 1.9.3, I could not find a way to make it work on ruby 1.8.7.