From: Ruby Rabbit Date: 2009-01-07T17:09:07+09:00 Subject: Re: Could not understand this: 3.class is Fixnum or Class Stefano Crocco wrote: > Alle Wednesday 07 January 2009, Ruby Rabbit ha scritto: >> >> Could someone explain what I am missing here. >> Thx. > > Stefano Thanks. Actually both replies side step the issue I have at hand. I have an incoming variable, I store its class, the variable is converted to a string. When the class returns the variable, it converts back. def set_buffer val @datatype = val.class @buffer = val.to_s end def get_buffer case @datatype when Fixnum return @buffer.to_i etc end Its like the above. So, instead of saying @datatype = val.class.to_s and later checking for a string, i was trying to store the class and check against it. Thanks for clearing up the confusion. -- Posted via http://www.ruby-forum.com/.