Michael Campbell
3/17/2005 12:42:00 AM
It's been suggested many times. I agree, but my vote hardly counts. =)
On Thu, 17 Mar 2005 09:16:26 +0900, Daniel Amelang
<daniel.amelang@gmail.com> wrote:
> > But "a".downcase! => nil ... And the same with most !-methods (they return
> > nil when nothing was changed).
>
> That always bothered me, since I lose my method chaining with !
> methods. Like this:
>
> line.strip!.downcase!
>
> must be
>
> line.strip.downcase
>
> to work properly. But then you lose some efficiency.
>
> I'd prefer that ! methods returned 'self'. In the *rare* case that I
> need to know if something changed, I'll use == or something. RCR in
> the making?
>
> Dan
>
>