public Method

Fixnum.==(p1)

fix == other

Return true if fix equals other numerically.

1 == 2      #=> false
1 == 1.0    #=> true

Source Code

/*
* call-seq:
*   fix == other
*
* Return <code>true</code> if <code>fix</code> equals <code>other</code>
* numerically.
*
*   1 == 2      #=> false
*   1 == 1.0    #=> true
*/

static VALUE
fix_equal(x, y)
   VALUE x, y;
{
   if (x == y) return Qtrue;
   if (FIXNUM_P(y)) return Qfalse;
   return num_equal(x, y);
}
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.