rspec/rules/S2757/ruby/fix.adoc

19 lines
251 B
Plaintext
Raw Normal View History

Replace the operators with a single one if that is the intention
[source,ruby]
----
target = -5
num = 3
target -= num # target = -8
----
Or fix the spacing to avoid confusion
[source,ruby]
----
target = -5
num = 3
target = -num # target = -3
----