public Method

Fixnum.<=(p1)

fix <= other      true or false

Returns true if the value of fix is less thanor equal to that of other.

Source Code

/*
* call-seq:
*   fix <= other     => true or false
*
* Returns <code>true</code> if the value of <code>fix</code> is
* less thanor equal to that of <code>other</code>.
*/

static VALUE
fix_le(x, y)
   VALUE x, y;
{
   if (FIXNUM_P(y)) {
       long a = FIX2LONG(x), b = FIX2LONG(y);

       if (a <= b) return Qtrue;
       return Qfalse;
   }
   else {
       return rb_num_coerce_relop(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.