lib/opal/nodes/call.rb
# Handle "special" method calls, e.g. require(). Subclasses can override
# this method. If this method returns nil, then the method will continue
# to be generated by CallNode.
Handle "special" method calls, e.g. require(). Subclasses can override
this method. If this method returns nil, then the method will continue
to be generated by CallNode.
Handle " special " method calls e . g . require () . Subclasses can override this method . If this method returns nil then the method will continue to be generated by CallNode .
def handle_special(&compile_default)
        if SPECIALS.include? meth
          method = method("handle_#{meth}")
          method.arity == 1 ? method[compile_default] : method[]
        elsif RuntimeHelpers.compatible?(recvr, meth)
          push(RuntimeHelpers.new(sexp_with_arglist, @level, @compiler).compile)
        else
          yield 
        end
      end
def handle_special ( & compile_default ) if SPECIALS . include? meth method = method ( "handle_#{meth}" ) method . arity == 1 ? method [ compile_default ] : method [ ] elsif RuntimeHelpers . compatible? ( recvr , meth ) push ( RuntimeHelpers . new ( sexp_with_arglist , @level , @compiler ) . compile ) else yield end end
Handle "special" method calls, e.g.
Handle " special " method calls e . g .
# i.e. compile_default.call
compile_default
<not_specific>