If you find the below test,you would see that, object_id
s are always
same for the three objects - true
,false
and nil
.
Why for these objects object_id
s are not allocated in run time?
true.object_id
=> 2false.object_id
=> 0nil.object_id
=> 4‘a’.object_id
=> 17515344nil.object_id
=> 4‘a’.object_id
=> 18433428false.object_id
=> 0‘a’.object_id
=> 18454176true.object_id
=> 2