From: "Peña, Botp" Date: 2008-11-17T17:05:15+09:00 Subject: Re: How can I overload a method in Ruby From: Zhao Yi [mailto:youhaodeyi@gmail.com] # def build() # make # end # # def build(directory) # cd directory # make # end # # but without overloading, I have to do this: # def build(directory) # if(directory == nil) # make # else # cd directory # make # endif # end try it like, def build directory=nil cd directory unless directory.nil? make end