From: Tim Bates Date: 2003-03-18T16:27:31+09:00 Subject: Substitution in a string in a string I am using eval to dynamically define a method, and at some point, I want to do this: raise "Invalid type: #{val}" Except that this is inside an eval'd string, and so #{val} gets evaluated the first time, and at this point val doesn't exist. I've tried all sorts of things like raise "Invalid type: #{"#{val}"}" but none of them quite do what I want. I eventually settled for raise "Invalid type: " + val.to_s but it still raises the question, how do you force a #{...} not to be evaluated? Tim Bates -- tim@bates.id.au