From: dblack@... Date: 2002-11-26T22:10:04+09:00 Subject: Re: Things That Newcomers to Ruby Should Know (11/24/02) Hi -- On Tue, 26 Nov 2002, Austin Ziegler wrote: > On Tue, 26 Nov 2002 12:14:58 +0900, Daniel Carrera wrote: > >> It's applicable to a small subset of the total set of classes. > >> Really, x++ is the same as x.succ!, and x.succ! won't work > >> because there's no assignment and you can't change self. > > I don't follow that. Why is it that I can do string.chomp! but it > > is not conceivable to do x.succ!? Aren't you changing self with > > string.chomp!? > > Nope. > > x.succ! says "x should be changed to be the succeeding object". > x.chomp! says "x should have newlines removed from itself." > > x.succ! results in a new object; x.chomp! does not. But wait -- see your next post :-) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav