From: Zhenning Guan Date: 2010-01-26T11:53:10+09:00 Subject: how to refactor these code? def ss(s = 'hello', yeah = nil) if yeah puts "something" else puts "other thing" end #code continue .... end I have this method, use it like that: ss('hi', yeah = true) ss('hello') ss('fuck', yeah = true) ss('hello',yeah = true) very ugly.. sometimes I just need to passed yeah = true, but I have to added 'hello' first. what should I do? -- Posted via http://www.ruby-forum.com/.