1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Pass Encoding::UTF_8 to String#encode instead of 'UTF-8' for efficiency

This commit is contained in:
Benoit Daloze 2021-08-19 20:09:17 +02:00
parent 3bc074ae1f
commit 181cb0a9d1

View file

@ -19,7 +19,7 @@ module ExecJS
end
else
def encode(string)
string.encode('UTF-8')
string.encode(::Encoding::UTF_8)
end
end
end