Ruby

Ruby

Made by DeepSource

Use tr/delete instead of gsub RB-PR1022

Performance
Major
Autofix

tr/delete are more efficient than gsub.

Bad practice

'abc'.gsub('b', 'd')
'abc'.gsub('a', '')

Recommended

'abc'.tr('b', 'd')
'abc'.delete('a')