I, unfortunately, failed to understand your code until I had rediscovered
and reimplemented the fix almost verbatim.

So it was just a difference in style between your code and mine that I used
[] when you used delete(), but
I don't think it makes any difference whether we delete "type" and "title" -
I'm pretty sure that there's plenty of other places that they get duplicated
into the :parameters hash.
I don't mind changing my commit if you disagree, though.

~Jesse

On Thu, Jul 15, 2010 at 5:39 PM, Peter Meier <[email protected]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > -    obj = Puppet::Parser::Resource.new(hash)
> > +    obj = Puppet::Parser::Resource.new(hash["type"], hash["title"],
> hash)
>
> the reason why I used hash.delete('type') in my patch was that later in
> Puppet::Resource we will iterate over all parameters (which is that
> hash), which assigns type and title implicitly and then later we once
> again explicitly add type and title through  extract_type_and_title and
> there is even a reason explained why we do that over temporary variables.
>
> So we're doing the assignment once how we shouldn't do it, to just do it
> some lines later the right way.
>
> Or is that just not that important? But, so why add it later explicitly
> with that workaround?
>
> cheers pete
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkw/qk8ACgkQbwltcAfKi3/GhwCeKQ/hPrN7M4ao1U1DqbBrNNkn
> negAniWboY5g5gzeE7alYTAplYXkJlmv
> =4B1/
> -----END PGP SIGNATURE-----
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to