puppetlabs/puppet — pull request #1382 by Aethylred (2013-01-09 22:47:00+00:00)
Title: (#18452) Explicitly casts variables as strings before calling gsub

Casts variables as strings with to_s before doing greedy substitution with gsub.

Should avoid incidents of:

```
undefined method `gsub' for nil:NilClass (NoMethodError)
```

when a variable fails to cast itself properly as a string.