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
1 changed files with 1 additions and 1 deletions

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