public Method

Fixnum.-@

-fix     integer

Negates fix (which might return a Bignum).

Source Code

/*
* call-seq:
*   -fix   =>  integer
*
* Negates <code>fix</code> (which might return a Bignum).
*/

static VALUE
fix_uminus(num)
   VALUE num;
{
   return LONG2NUM(-FIX2LONG(num));
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.