Skip to content

Commit

Permalink
Pass Encoding::UTF_8 to String#encode instead of 'UTF-8' for efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Sep 23, 2021
1 parent 0037264 commit 73a6717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/execjs/encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def encode(string)
end
else
def encode(string)
string.encode('UTF-8')
string.encode(::Encoding::UTF_8)
end
end
end
Expand Down

0 comments on commit 73a6717

Please sign in to comment.