Use Pathname#read again but with force_encoding

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
This commit is contained in:
Issy Long 2024-08-10 17:24:05 +01:00 committed by GitHub
parent 0355f07e0d
commit b6fbd51f0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ module Readall
next if valid == true || valid&.include?(bottle_tag)
formula_name = file.basename(".rb").to_s
formula_contents = File.read(file, encoding: "UTF-8")
formula_contents = file.read.force_encoding("UTF-8")
readall_namespace = "ReadallNamespace"
readall_formula_class = Formulary.load_formula(formula_name, file, formula_contents, readall_namespace,