On 2009-11-04, RichardOnRails <RichardDummyMailbox58407 / USComputerGurus.com> wrote:
> I grateful for you taking the time to identify my deficiencies.
I'd call it an oversight, not a personal failing.
It might make sense to want to be able to do
def pp()
old = self
self = self + 1
old
end
or something similar, but it's not well-defined. The problem is that
fundamentally, when you have two variables, a and b, which both contain
the object 1 (a Fixnum), there's no way to say "I want the object a points
to to change, but not the object b points to" *in a method call*. Because
the method call works on the object, not the variable.
-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam / seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!