From: Nathan Olberding Date: 2006-04-21T06:49:04+09:00 Subject: Optional Message Parameters? (Warning: Newbie Altert!) How do I write a method with optional params? I would think that this: def do_this(opt1="", opt2="") puts opt2 end do_this(opt2="This") Would result in "This" being displayed. Instead, "This" becomes the value of opt1. I'd like to set opt1 and opt2 to default to "". How do I do that? -- Posted via http://www.ruby-forum.com/.