I have come across a very common scenario as follows-
var_float += 1234.1234
var_float = var_float.round(2)
Here the value for
is getting calculated with some complicated expressions and there I cannot do like
var_float += 1234.1234.round(2)
this. Hence one more line to reassign the same.
I was wondering if there's any better way to do this ruby?
For ex. if I can do something like
var_float .= round(2)