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 Oct 19, 2021
1 parent 3bc074a commit 181cb0a
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 181cb0a

Please sign in to comment.