You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
commit d4d6414 (or a change recently introduced in master) still seems to be producing wrong corrections. Also, the message displayed was a bit misleading.
I had code like:
a = somestring.gsub(/\n/,'')
The cop mentioned:
C: Use delete instead of gsub.
auto-correct turned the code into:
a = somestring.tr('\\n', '')
which is neither using delete, nor is is producing the expected (same) result.
The text was updated successfully, but these errors were encountered:
Interesting issue. somestring.tr('\\n', '') and somestring.delete('\\n') would produce the same outcome and are nearly identical in efficiency. Thanks for the fix @alexdowad.
commit d4d6414 (or a change recently introduced in master) still seems to be producing wrong corrections. Also, the message displayed was a bit misleading.
I had code like:
The cop mentioned:
C: Use delete instead of gsub.
auto-correct turned the code into:
which is neither using delete, nor is is producing the expected (same) result.
The text was updated successfully, but these errors were encountered: