x + y
- syntactic sugar for
x.send(:+, y)
What is this syntactic sugar?
x += y
I tried
x.send(:+=, y)
but it does not work
This is not a method. This is a shortcut (syntactic sugar) for writing the following:
x = 1 #=> 1 x += 1 # same as x = x + 1 #=> 2