From: "Aleksi Niemelä" Date: 2000-05-10T16:00:52+02:00 Subject: [ruby-talk:02706] X++? My (daily :) contribution to the sudden burst of traffic: I start yet another thread... 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? class Fixnum def ++ self = self + 1 end end def Fixnum.-- self = self - 1 end a = 1 print a,"\n" a.++ print a,"\n" a.-- print a,"\n" If this is a working idea and the code should work, I have to ask it again. Should this really work? - Aleksi