Don't treat flonum specially in object ID
flonum is just a special constant, so we don't need to treat it in any special way.
This commit is contained in:
parent
edec690e03
commit
9bab179ca3
5
gc.c
5
gc.c
@ -4522,16 +4522,13 @@ os_id2ref(VALUE os, VALUE objid)
|
||||
static VALUE
|
||||
rb_find_object_id(VALUE obj, VALUE (*get_heap_object_id)(VALUE))
|
||||
{
|
||||
if (FLONUM_P(obj)) {
|
||||
if (SPECIAL_CONST_P(obj)) {
|
||||
#if SIZEOF_LONG == SIZEOF_VOIDP
|
||||
return LONG2NUM((SIGNED_VALUE)obj);
|
||||
#else
|
||||
return LL2NUM((SIGNED_VALUE)obj);
|
||||
#endif
|
||||
}
|
||||
else if (SPECIAL_CONST_P(obj)) {
|
||||
return LONG2NUM((SIGNED_VALUE)obj);
|
||||
}
|
||||
|
||||
return get_heap_object_id(obj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user