diff --git a/lib/bootsnap/load_path_cache/path.rb b/lib/bootsnap/load_path_cache/path.rb index 56fff8c..20f157e 100644 --- a/lib/bootsnap/load_path_cache/path.rb +++ b/lib/bootsnap/load_path_cache/path.rb @@ -22,7 +22,11 @@ def volatile? attr_reader(:path) def initialize(path, real: false) - @path = path.to_s.freeze + @path = path.to_s + if @path.encoding == Encoding::ASCII_8BIT + @path = @path.dup.force_encoding('UTF-8') + end + @path.freeze @real = real end