From: Joel VanderWerf Date: 2002-11-20T04:35:15+09:00 Subject: Re: Symbol usage help ahoward wrote: > > rubyists- > > given > > a = 42 > b = 'forty-two' > > is it possible to do something like : > > %w( a b ).each do |s| > puts "#{s} = #{s.intern.value}" > end > > to output > > a = 42 > b = forty-two > > obviously, the Symbol#value method does not exist, but this should be clear > enough... Instead of s.intern.value Try eval s or eval s.intern.to_s