Indeed, I did change it to that but it would still be nice to know what's
going on so that I can stuff it into rspec and check for it.

Thanks,

Trevor

On Wed, Jul 15, 2015 at 2:59 PM, R.I.Pienaar <[email protected]> wrote:

>
>
> ----- 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.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

-- 
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/CANs%2BFoWKrP%2Btj%2BJsiENkam9q7ohLGQd5-Z5Gfa%3DoE%2BsSX2D%2Bvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to