I\'m wondering why calls to operator methods don\'t require a dot? Or rather, why can\'t normal methods be called without a dot?
Example
class Foo
def +(obje
Because Ruby has "syntax sugar" that allows for a variety of convenient syntax for preset situations. For example:
class Foo
def bar=( o ); end
end
# This is actually calling the bar= method with a parameter, not assigning a value
Foo.new.bar = 42
Here's a list of the operator expressions that may be implemented as methods in Ruby.