I was trying to overload one method but it does not work like Java.
I noticed it only uses the first method that it meets.
is there any special way for overloading in ruby.
def sum(a, b)
return a + b
def sum(a, b, c)
return a + b + c
obj = Overloading.new
puts obj.sum(5, 7)
puts obj.sum(5, 6, 7)
overloading.rb:13:in `sum’: wrong number of arguments (2 for 3)