public Method

Fixnum.^(p1)

fix ^ other      integer

Bitwise EXCLUSIVE OR.

Source Code

/*
* call-seq:
*   fix ^ other     => integer
*
* Bitwise EXCLUSIVE OR.
*/

static VALUE
fix_xor(x, y)
   VALUE x, y;
{
   long val;

   if (TYPE(y) == T_BIGNUM) {
       return rb_big_xor(y, x);
   }
   val = FIX2LONG(x) ^ NUM2LONG(y);
   return LONG2NUM(val);
}
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.