From: "David A. Black" Date: 2005-10-08T21:23:38+09:00 Subject: bang methods (was: Re: select! not present but reject! is) Hi -- On Sat, 8 Oct 2005, Devin Mullins wrote: > David A. Black wrote: > >> The ! doesn't mean that a method modifies the receiver in place, >> though, but rather that this is a "dangerous" version of the method >> and should be used carefully. The "danger" often has to do with >> in-place change, but ! itself doesn't mean that. > > True, but the large majority of ! methods are simply in-place equivalents of > their non-bang friends: [hundreds of lines of ri output snipped :-] Heavens -- I think we all knew that already :-) There's one that I don't think you included: Tempfile#close! which closes and unlinks the file. One reason I think it's useful to remember the real meaning of ! is that gives one a potentially useful tool to use in one's own classes. I don't know how many people actually write bang methods. I've done it once or twice. David -- David A. Black dblack@wobblini.net