From: William Djaja Tjokroaminata Date: 2002-09-25T05:41:39+09:00 Subject: Re: Regular expression object question Hi, I don't know whether it is worth an RFC (what is RFC?) At least, regarding the understanding, when you want to overload +=, it is not for the source method, but for the regexp itself. "re.source" returns a new string, which is independent of the re. Because a string accepts the "+" operator, "re.source += str" returns another new string, but the original re does not change. The correct way for your intention (when it is overloaded) is to write "re += '|abc'". By the same token, you just want a regexp to be able to accept the "+" operator (which is actually a method). Regards, Bill ============================================================================= Berger, Daniel wrote: > Good idea. What about overloading += for the source method? > e.g. > re = /xyz/ > re.source += "|abc" > puts re.source -> "xyz|abc" > Worth an RFC? > Regards, > Dan