From: Robert Klemme Date: 2009-08-13T23:11:57+09:00 Subject: Re: Background on why Ruby doesn't support ++ 2009/8/13 Mark Thomas : > Don't forget there's already > > x.next > > although there is not the orthogonal x.prev, which seems like the > Principle of Most Surprise in effect :-). One way to rectify that is > to open up Integer yourself: > > class Integer >  def prev >    self - 1 >  end > end There is also #succ and #pred. But this is not the point: all of them work by returning _a different object_. You can easily verify by looking at the result's #object_id. Operators ++ and -- in C++ on the other hand change the object (int, long etc.) itself. The difference is whether you will have aliasing or not. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/