From: "Stephan Kämper" Date: 2004-04-22T06:59:10+09:00 Subject: Re: Creating bang methods Jon Hurst wrote: > On reflection, perhaps I have not been clear enough. I would like to create > bang methods of some math functions (mostly abs), but I don't know how to > modify the reciever in place because the value of self cannot be changed. > It's not really important that I be able to write these bang methods, but I > would very much like to understand how one would do it. > > Class Numeric > def abs! > ?? > end > end > Even if you had a way to implement some bang-abs, what would you expect -4.abs! to be? Happy rubying Stephan