Method: Rugged::Object#==
- Defined in:
- ext/rugged/rugged_object.c
#==(other) ⇒ Object
Returns true only if object
and other are both instances or subclasses of Rugged::Object and have the same object id, false otherwise.
350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'ext/rugged/rugged_object.c', line 350
static VALUE rb_git_object_equal(VALUE self, VALUE other)
{
git_object *a, *b;
if (!rb_obj_is_kind_of(other, rb_cRuggedObject))
return Qfalse;
TypedData_Get_Struct(self, git_object, &rugged_object_type, a);
TypedData_Get_Struct(other, git_object, &rugged_object_type, b);
return git_oid_cmp(git_object_id(a), git_object_id(b)) == 0 ? Qtrue : Qfalse;
}
|