public Method

Comparable.>=(p1)

obj >= other     true or false

Compares two objects based on the receiver’s <=> method, returning true if it returns 0 or 1.

Source Code

/*
*  call-seq:
*     obj >= other    => true or false
*  
*  Compares two objects based on the receiver's <code><=></code>
*  method, returning true if it returns 0 or 1.
*/

static VALUE
cmp_ge(x, y)
   VALUE x, y;
{
   VALUE c = rb_funcall(x, cmp, 1, y);

   if (NIL_P(c)) return cmperr();
   if (rb_cmpint(c, x, y) >= 0) return Qtrue;
   return Qfalse;
}
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.