From: Chris Dempsey Date: 2009-09-30T00:55:40+09:00 Subject: YAML & String Interpolation --001485f78c2803b6f60474b9725e Content-Type: text/plain; charset=ISO-8859-1 I'm trying to read in a YAML string stored in a configuration file and have Ruby perform String interpolation on it. For example, === YAML file === remote_machine: "${server}:${port}" === RUBY === def load_settings @options = {} imports = YAML.load_file('server-info.yaml') if imports imports.each_pair do |key, value| if not key.is_a? Symbol imports[key.to_sym] = value imports.delete(key) end end @options = imports.merge(@options) end end server = '192.168.0.1' port = '8080' print @options[:remote_machine] # => 192.168.0.1:8080 Instead what I'm getting is the printing of ${server}:${port}. --001485f78c2803b6f60474b9725e--