On Jul 19, 2014, at 17:02, Juanjo Conti <jjconti / gmail.com> wrote:

> 2.1.2 :025 > A +B
> NoMethodError: undefined method `+@' for "B":String
>     from (irb):25
>     from /home/juanjo/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'

>> RubyParser.new.parse "A + B"
=3D> s(:call, s(:const, :A), :+, s(:const, :B))

>> RubyParser.new.parse "A +B"
=3D> s(:call, nil, :A, s(:call, s(:const, :B), :+@))

So it is seeing "A(+B)" where "+" is a unary method, much like "-".

Same as if you typed `N +4`, it'd see `N(+4)`, call unary + on 4, then =
pass that as an arg to N.