def process_call exp
target = exp.target
if sexp? target
target = process target
end
exp.target = target
exp.arglist = process exp.arglist
method = exp.method
if node_type?(target, :lvar, :ivar) and (target.value == :_buf or target.value == :@output_buffer)
if method == :<< or method == :safe_concat
arg = normalize_output(exp.first_arg)
if arg.node_type == :str
ignore
elsif node_type? target, :ivar and target.value == :@output_buffer
add_escaped_output arg
else
add_output arg
end
elsif method == :to_s
ignore
else
abort "Unrecognized action on buffer: #{method}"
end
elsif target == nil and method == :render
make_render_in_view exp
else
exp
end
end