From 43b7baad949563de0760083578eee8e55af6fc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Mon, 28 Oct 2024 19:35:32 +0200 Subject: [PATCH] Support Unicode Gem path --- lib/bootsnap/load_path_cache/path.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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