ERB added the trim_mode keyword argument in ruby 2.6.0: https://github.com/ruby/ruby/commit/cc777d09f44fa909a336ba14f3aa802ffe16e010 If we drop 2.6 support, then we can switch to the keyword argument everywhere. Otherwise, we'll need to choose between positional and keyword args.
There's a PR up for PUP-11552 so closing this. The PR should fix ERB warnings coming from templatewrapper and other places in the puppet repo.