mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
include/ruby/ruby.h: add doxygen
Must not be a bad idea to improve documents. [ci skip]
This commit is contained in:
parent
4912260b70
commit
e18bc14a05
Notes:
git
2021-09-10 20:01:11 +09:00
2 changed files with 170 additions and 18 deletions
11
object.c
11
object.c
|
@ -115,17 +115,6 @@ rb_obj_setup(VALUE obj, VALUE klass, VALUE type)
|
|||
/* The default implementation of #=== is
|
||||
* to call #== with the rb_equal() optimization. */
|
||||
|
||||
/*!
|
||||
* This function is an optimized 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 optimization 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.
|
||||
*/
|
||||
VALUE
|
||||
rb_equal(VALUE obj1, VALUE obj2)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue