Anyone know why Array#uniq returns an array in every case and
Array#uniq! returns nil if nothing is removed? I’d prefer it to
return
the array in every case but I’m sure my attempt to reduce one line
of
code (no flames on this plz, it’s just fun) are superseded by some
really important concept I don’t know about.
There are a number of “bang” methods that do this. If I recall
correctly, matz has said they do this so that you CAN’T chain the
methods.
I’m sure there’s a technical reason for this, but I don’t know what
it might be.
I agree that it’s irritating.
···
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com