Hey guys,

I'm slowly getting the hang of Ruby, I'm a Java guy by trade. I really
like Ruby and am picking up on it pretty quickly, but for some reason my
overload of the "+" operator is not working. Here is the code:

class Overloading
def -(a)
  return -a
end
b = 2-4
puts "#{b}"
end

Basically, I'm trying to turn the minus operator into a plus operator
for a project to show how operator overloading in Ruby works, but this
isn't working from some reason, and I'm not sure why.

Help?

Thanks,

Trevor
-- 
Posted via http://www.ruby-forum.com/.