Actions
Patch #31059
closedUse #b shortcut instead of #force_encoding
Patch #31059:
Use #b shortcut instead of #force_encoding
Description
follow up for #26561
this patch replaces all .force_encoding('ASCII-8BIT') or .force_encoding('BINARY') to .b
String#b is available since Ruby 2.0
https://www.rubydoc.info/stdlib/core/2.0.0/String%3ab
#b returns unfrozen string so + can be omited, this way the code can be much shorter and it's even faster
Files
Actions