From: Hal Fulton Date: 2005-06-03T09:45:16+09:00 Subject: Re: Method Chaining Issues Logan Capaldo wrote: > On 6/1/05, Hal Fulton wrote: > >> >>The ! usually (not always) indicates that a method changes its >>receiver "in place" rather than creating a new object as a result. > > > Just curious, can you give me an example of a bang method that doesn't > modify the > receiver in place? > The only one in the core is exit! as far as I know. Some things like Kernel#chomp! have an implicit receiver, so they don't really make my point. There may be others in the std lib or other common libs, I don't know. The point is that the ! is to mark a method as "dangerous" or "requiring caution." I certainly use it in my own code in situations where it doesn't change the receiver. In fact, I encourage others to do the same, as it helps dispel the minor misconception. Just my opinion. Hal