From: Ryan Victory Date: 2013-02-28T06:49:07+09:00 Subject: Re: Object track llist for a particular class. Hans, While your solution is almost perfect, I did notice that he wanted the output to be in the form of [a,b], so I modified it slightly (forgive my Regex, it was a quick hack because I know the question urgently needed an answer): Hash[local_variables.map {|k| [k,eval(k.to_s)]}].inspect.scan(/(?:\{| )\:([^=]+)\=/).flatten Love U Ruby, that should return for you the instances in the form of ["a","b"] in your example. -Ryan On 2/27/13 3:37 PM, Xavier R. wrote: > Hans Mackowiak wrote in post #1099426: >> Hash[local_variables.map {|k| [k,eval(k.to_s)]}] >> > > Thanks. > > Could you bit explain the above please? >