From: Paul Bergstrom Date: 2010-10-16T04:07:36+09:00 Subject: Setting variable with either value Is there a better way to write this? @a = "abc" @a = @b if @b This will set value @a to @b if @b already have a value since before. If not it will use the default @a which is "abc". -- Posted via http://www.ruby-forum.com/.