From: Christian Neukirchen Date: 2005-06-02T21:48:53+09:00 Subject: Re: Method Chaining Issues Logan Capaldo writes: > From: Logan Capaldo > Subject: Re: Method Chaining Issues > To: ruby-talk@ruby-lang.org (ruby-talk ML) > Date: Thu, 2 Jun 2005 20:50:15 +0900 > Reply-To: ruby-talk@ruby-lang.org > X-Mail-Count: 144347 > > On 6/1/05, Hal Fulton wrote: >> Kyle Heon wrote: >> > >> > I'm new to Ruby so I when you refer to a "bang" method you mean something >> > like "chomp!"? And if so, why do some thing they shouldn't exist? Just >> > curious. >> > >> >> Oops, failed to address the other half of that. >> >> 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? ----------------------------------------------------------- Kernel#exit! Process.exit!(fixnum=-1) ------------------------------------------------------------------------ Exits the process immediately. No exit handlers are run. _fixnum_ is returned to the underlying system as the exit status. Process.exit!(0) -- Christian Neukirchen http://chneukirchen.org