From: Austin Ziegler Date: 2003-03-21T12:34:32+09:00 Subject: Re: Proposal: new operator: '<-' (for assignments) On Fri, 21 Mar 2003 11:20:27 +0900, Phil Tomson wrote: > Now of course, I could have allowed access to @val by declaring an > attr_accessor, but in many cases I don't want to expose that > information or make users of the class have to remember the name > of the variable 'val'. It just seems much cleaner in many cases to > have an assignment operator. Up till now I've been overriding '<<' > to do this, but now I've run into a case where I'd like to pass on > operators to the underlying value (@val in the example above) > using method_missing so the underlying value can be shifted (and > since '<<' is overriden, that's kind of tough). Array, String, and Hash use #replace to do this. -austin -- Austin Ziegler, austin@halostatue.ca on 2003.03.20 at 22:29:11