Re: [Puppet Users] property file provider

Stefan Schulte
Tue, 23 Aug 2011 20:59:58 -0000

On Tue, Aug 23, 2011 at 04:19:40PM -0400, David Kavanagh
wrote:
> for reference, here''s how the regex matches the trailing comment;
> http://rubular.com/r/vJUtBWpB6J
>

Yes, rubular shows all fields but the last field is in fact nil and not an
empty string. Try to replace

  str += " # #{hash[:comment]}" if hash[:comment] != :absent

with

  str += " # #{hash[:comment]}" unless hash[:comment].nil?

Does this work?

-Stefan