# File format.rb, line 489 def setVarValue (var_name, var_value, aBinding) if var_value.nil? var_value = '' end var_value.gsub!(/^\s+/,'') if (aBinding.class != binding.class) aBinding[var_name] = var_value else escaped_var_value = var_value.gsub(/(\\*)'/) { |m| $1.length % 2 == 0 ? $1 + "\\'" : m } to_eval = "#{var_name} = '#{escaped_var_value}'"; #puts "going to eval '#{to_eval}'" eval(to_eval, aBinding) end end