public Method

Object.===(p1)

obj === other    true or false

Case Equality—For class Object, effectively the same as calling #==, but typically overridden by descendents to provide meaningful semantics in case statements.

Source Code

/*
*  call-seq:
*     obj === other   => true or false
*  
*  Case Equality---For class <code>Object</code>, effectively the same
*  as calling  <code>#==</code>, but typically overridden by descendents
*  to provide meaningful semantics in <code>case</code> statements.
*/

VALUE
rb_equal(obj1, obj2)
   VALUE obj1, obj2;
{
   VALUE result;

   if (obj1 == obj2) return Qtrue;
   result = rb_funcall(obj1, id_eq, 1, obj2);
   if (RTEST(result)) 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.