From: Brian Tully Date: 2004-06-23T05:40:04+09:00 Subject: Re: Newbie question - how to replace multiple whitespace within astring? > >> squeeze! - Squeezes str in place, returning either str, or nil if no >> changes were made. >> >> I interpret this as if no changes were made "nil" will be returned, so in my >> example of "California" wouldn't this set @state to nil? >> >> >> > correct > > you would use squeeze if you wanted to modify @user["state"]. In which > case the following lines are about equivilent > > @user["state"] = @user["state"].squeeze > @user["state"].squeeze! > Aha! Thanks Mark :) That clears it up for me :) Best regards, brian