pub unsafe extern "C" fn rb_equal(lhs: VALUE, rhs: VALUE) -> VALUEExpand description
This function is an optimised version of calling #==. It checks equality
between two objects by first doing a fast identity check using using C’s
== (same as BasicObject#equal?). If that check fails, it calls #==
dynamically. This optimisation actually affects semantics, because when
#== returns false for the same object obj, [rb_equal]obj, obj) would
still return true. This happens for Float::NAN, where Float::NAN == Float::NAN is false, but [rb_equal]Float::NAN, Float::NAN) is true.
§@param[in] lhs Comparison LHS. @param[in] rhs Comparison RHS. @retval RUBY_Qtrue They are the same. @retval RUBY_Qfalse They are different.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3