From: matz@... (Yukihiro Matsumoto) Date: 2000-05-10T23:23:29+09:00 Subject: [ruby-talk:02710] Re: X++? Hi, In message "[ruby-talk:02706] X++?" on 00/05/10, Aleksi Niemel� writes: |I got an idea from http://www.pragprog.com:8080/rubyfaq/rubyfaq-5.html#ss5.3 |and thought to try. I didn't manage to make "auto(in|de)crement" working so |could somebody help here? Does this contain some errors or is the idea |wrong? (1) ++ and -- are NOT reserved operator in Ruby. (2) C's increment/decrement operators are in fact hidden assignment. They affect variables, not objects. You cannot accomplish assignment via method. Ruby uses +=/-= operator instead. (3) self cannot be a target of assignment. In addition, altering the value of integer 1 might cause severe confusion throughout the program. matz.