So when we call @test_scores.clear() for example, that's still message passing to another object.
But doing @test_scores = [] is reassignment.
Funny enough test.scores = [] is *not*, because in this case scores=() is a method, and so it's doing message passing.
But doing @test_scores = [] is reassignment.
Funny enough test.scores = [] is *not*, because in this case scores=() is a method, and so it's doing message passing.
Comments
2 + 2 is message passing in Ruby. It's 2.send(:+, 2)
So you really do need to come around to the idea that we don't actually have primitive types + operators in order to understand the language.
Based on your replies so far, I think you'll love what's to come in this thread.