From: Deni George Date: 2006-11-23T02:08:14+09:00 Subject: type information Nobuyoshi Nakada wrote: > Hi, > > At Mon, 20 Nov 2006 18:35:48 +0900 > Deni George wrote in [ruby-core:09581]: > >> how does the interpreter (ruby1.8.5) store the type information of a >> variable > > > In Ruby, variables have no type information at all. > If you meant "the information about the object which is refered by a > variable", others have replied. > hi all thanx for ur help till now :) -what i want is this To construct a CFG corresponding to the parse tree "ruby_eval_tree", the discription is as follows: it contains a node corresponding to every statement in every node all the variables used in that statement is stored the type information corresponding to every variable is also stored - what i ve done till now is this i ve collected the variables and stored them in the nodes corresponding to each statement. a variable can be indexed using "ruby_scope->local_vars[node->nd_cnt]" i tried to apply TYPE and CLASS_OF on this but it is giving same value for all the variables no matter what type of the object it is holding i tried to trace how it finds the correct method to call .. it is using the same CLASS_OF function to get the type and index it into the method table dont know what to do :( - Deni