1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix for reading binary file on Windows

This commit is contained in:
Aidan Haran 2020-05-11 15:45:46 +01:00
parent 9488712365
commit b31022052a

View file

@ -10,7 +10,7 @@ class ActiveRecord::FixtureSet::RenderContext # :nodoc:
end
def binary(path)
%(!!binary "#{Base64.strict_encode64(File.read(path))}")
%(!!binary "#{Base64.strict_encode64(File.read(path, mode: 'rb'))}")
end
end
end