谁能帮我理解为什么一个对象Float
没有一个固定object_id
的对象而一个对象Fixnum
有一个固定的对象object-id
?
C:\>ruby -v
ruby 2.0.0p0 (2013-02-24) [i386-mingw32]
C:\>irb --simple-prompt
DL is deprecated, please use Fiddle
>> 10.object_id
#=> 21
>> 10.object_id
#=> 21
>> 10.22.object_id
#=> 18272628
>> 10.22.object_id
#=> 15089952
>> 3.14.object_id
#=> 18577176
>> 3.14.object_id
#=> 16707660