----- Original Message ----- > From: "Trevor Vaughan" <[email protected]> > To: "puppet-dev" <[email protected]> > Sent: Wednesday, July 15, 2015 7:50:36 PM > Subject: Re: [Puppet-dev] How do you know what variables are frozen?
> In this case, it was a custom function that was tripping things up. > > Looking through the code, I *think* this was the scenario: > > 1) Fact => trusted['certname'] > 2) Function call to parse_host($trusted['certname']) > 3) Parse host: > > host = args.first > host.strip! # Here's the offender > > I also tried seeing if dup'ing the args would work, but it copies the > frozen attribute with the String object (which makes sense). > > So, I don't know if I was trying to modify something from a Fact or if the > object just happened to be carrying the 'frozen' status as it went along. so do not use strip! use x = something.strip? this way you dont try to modify anything in scope. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/1753817636.200946.1436986745705.JavaMail.zimbra%40devco.net. For more options, visit https://groups.google.com/d/optout.
