From: Mike Date: 2007-03-07T18:35:05+09:00 Subject: Setting default vales Hello, I want to have some function that will two parameters. First is the variable name and second is a value. Inside I will check: * if the variable is existed I do nothing * else I assign "value" to variable It should be something like this but it is not working. def set_default(name, val) if ! name then eval "#{name} = #{val}" end end set_default("b", "2") puts "b = " + b