From: Zhao Yi Date: 2008-11-17T16:26:27+09:00 Subject: How can I overload a method in Ruby This is my class definition: class Impl include MyModule def fun() puts ("fun") end def fun(directory) puts ("fun directory") end end m=Impl.new() m.fun() When I run this program, I got this error: class_objects/module.rb:22:in `fun': wrong number of arguments (0 for 1) (ArgumentError) from class_objects/module.rb:22 I declared two methods with the same name but different parameters. Why can't ruby support overload method? -- Posted via http://www.ruby-forum.com/.