[#4370] Fixes extlookup precedence getting overwritten between runs
We found the gsub! in extlookup was actually modifying the value for
extlookup_precedence, so the next node to call it just got the
interpolated value from the first run.
We did two things in the code to prevent this:
- We returned a dup of the ast string object so that modifying it
wouldn’t change puppet’s state. We didn’t do this for all possible
return values because we depend on using the original ast array object
to do array concatenation
- We fixed extlookup to not do a destructive gsub
Reviewed by: Jesse Wolfe