From: "Todd A. Jacobs" Date: 2007-09-07T14:21:34+09:00 Subject: Accessing variable names in ruby I found myself trying to do a bit of ruby debugging, and was going crazy trying to figure out how to display a variable's name instead of its value in a string. There may be a more elegant way, but I found that symbols did what I wanted: if $DEBUG [:my_email, :my_resume, :my_logfile].each do |v| $stderr.puts "DEBUG: #{v} = #{eval v.to_s}" end end Is there a better way? -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks"