From: Sam Sungshik Kong Date: 2004-06-26T03:13:08+09:00 Subject: Re: I am confused with Value Type Objects Wow, I'm so impressed that within 30 minutes I got 3 answers...:-) This group is very active, helpful, and enthusiastic. Thanks all. May I ask further questions related to the direct value type objects? Now I understand how the FixNum is stored in the memory. What about other value types - true, false, nil? How are they distinguished from FixNum? What are their sized? Sorry to bother you guys with my beginner questions. Sam "Sam Sungshik Kong" wrote in message news:nmZCc.1209$QR1.961@newssvr27.news.prodigy.com... > Hello! > > In ruby, every object is reference type except for FixNum, NilClass, > TrueClass, FalseClass. > Let's consider FixNum only. > > According to http://www.rubygarden.org/ruby?GCAndMemoryManagement, FixNum > takes only 4 bytes (on 32-bit machines). > Is it true? > If so, doesn't it have any other information except for the value itself? > How does ruby know that a FixNum is actually a FixNum instead of a reference > to an object when it doesn't have any information about the type? > > I'm from C# background. > In C# (actually dotnet framework), values types are structures not just a > simple value. > > Could somebody resolve my confusion? > > Thanks. > > Sam > > >