(maint) Dup frozen File content strings
Commit 2a9e996 froze all string tokens in the lexer as a performance
tweak. This caused a regression in file content behavior where
file { '/tmp/foo': content => stuff }
would fail with a 'Error: Could not set content on file: can't modify
frozen String' when using the future parser on Ruby 1.9.3 and up. The
Ruby version requirement was because we force_encoding to ASCII_8BIT on
platforms (1.9.3 and up) which allow this, but you can't do that to a
frozen string. This was failing in the lib/puppet/type/file/content.rb
should= method, where the string was cloned, but a clone() clones the
frozen state.
Other Types, including user defined types, may override should= or munge
and have similar problems, so we are adding a convert_String to the
runtime3_support to step around this problem. This still leaves the
basic problem of mutation of strings within resource instances, but that
is pre-existing.