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
Updated by Go MAEDA over 7 years ago
Updated by Pavel Rosický over 7 years ago
- File core.patch core.patch added
- File tests.patch tests.patch added
fixed, thanks
Updated by Go MAEDA over 7 years ago
- Target version set to 4.1.0
Updated by Go MAEDA over 7 years ago
- Related to Feature #26561: Enable frozen string literals added
Updated by Go MAEDA over 7 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed the patches. Thank you for improving Redmine.
Updated by Go MAEDA over 7 years ago
- Subject changed from use #b shortcut instead of #force_encoding to Use #b shortcut instead of #force_encoding
Actions