Open files in binary mode master
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 22 Dec 2017 09:07:37 +0000 (10:07 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 22 Dec 2017 09:07:37 +0000 (10:07 +0100)
This should fix GitHub issue #4.

Additionally, opening in binary mode already forces the ASCII-8BIT
encoding, so there's no need to specify it anymore.

rcs-fast-export.rb

index f5e5ad2..4128335 100755 (executable)
@@ -392,7 +392,7 @@ module RCS
        def RCS.parse(fname, rcsfile, opts={})
                rcs = RCS::File.new(fname, ::File.executable?(rcsfile))
 
-               ::File.open(rcsfile, 'r:ASCII-8BIT') do |file|
+               ::File.open(rcsfile, 'rb') do |file|
                        status = [:basic]
                        rev = nil
                        lines = []