lib/opal/nodes/call_special.rb in opal-0.5.5 vs lib/opal/nodes/call_special.rb in opal-0.6.0
- old
+ new
@@ -75,10 +75,10 @@
def compile_operator
with_temp do |a| # args
with_temp do |r| # recv
cur = s(:call, s(:js_tmp, r), :[], s(:arglist, s(:js_tmp, a)))
- rhs = s(:call, cur, :+, s(:arglist, self.rhs))
+ rhs = s(:call, cur, op.to_sym, s(:arglist, self.rhs))
call = s(:call, s(:js_tmp, r), :[]=, s(:arglist, s(:js_tmp, a), rhs))
push "(#{a} = ", expr(first_arg), ", #{r} = ", expr(lhs)
push ", ", expr(call), ")"
end