From: Josh Cheek Date: 2010-09-11T02:05:19+09:00 Subject: Re: How to do foo.chomp!.rstrip!.downcase! ? --001485f1e7ce775147048feaba45 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Sep 10, 2010 at 11:26 AM, Jason Roelofs wrote: > On Sep 10, 2010, at 11:28 AM, ara.t.howard wrote: > > > > > > > > >> > >> ...it seems like I should be able to do: > >> > >> foo.chomp!.rstrip!.downcase! > >> > > > > you can. > > > > %w( chomp! rstrip! downcase! ).each{|m| foo.send(m)} > > > > -a > > > > So... what's wrong with: > > foo = foo.chomp.rstrip.downcase > > Jason > > What is the rationale behind having them return nil if unchanged? --001485f1e7ce775147048feaba45--