From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-10-28T10:19:17+09:00 Subject: [ruby-talk:23658] How to get a String to interpolate itself? I'm trying to read lines from a file that might contain something like: Here is a line with a variable to interpolate: #{var} Now when I read it in like: var = 99 File.foreach("junk.rbt") {|line| puts line } of course I get the same line in the file with the #{var} in it. I'd like to get: Here is a line with a variable to interpolate: 99 I suspect there must be a way to do this since using "" causes interpolation, how can I get an existing String to interpolate itself? Phil