From 181cb0a9d17863e04afcb97630159ce3d3a98d48 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 19 Aug 2021 20:09:17 +0200 Subject: [PATCH] Pass Encoding::UTF_8 to String#encode instead of 'UTF-8' for efficiency --- lib/execjs/encoding.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/execjs/encoding.rb b/lib/execjs/encoding.rb index 406fb0d..50ef928 100644 --- a/lib/execjs/encoding.rb +++ b/lib/execjs/encoding.rb @@ -19,7 +19,7 @@ module ExecJS end else def encode(string) - string.encode('UTF-8') + string.encode(::Encoding::UTF_8) end end end