From: tenten Date: 2012-09-20T13:59:28+09:00 Subject: Re: behavior of iterator methods > However, when you work with Fixnum literals, several things needs to be kept in mind: > > - Fixnums are immutable, there's no bang (!) methods to change them in-place like you can do for strings with update!() > > - Construct i += 1 in ruby is a syntax sugar for i = i + 1, so the result is a completely different Fixnum instance. Same is true for strings: > > s = "a" > s += "a" > > After the above s will be pointing to another instance of String class with value "aa", while > > s << 'a' > > will be pointing to the same instance of String with updated value 'aa' > This explain makes sence. I've understood. Thank you very much.