diff options
author | Paul Berry <paul@puppetlabs.com> | 2011-02-03 17:22:43 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2011-02-03 17:22:43 -0800 |
commit | e10ba1ab720cb62b39b430104a55a987f4c37f31 (patch) | |
tree | 1d847e457af83163dadd933632ab3af1eeedbddd /lib/puppet | |
parent | c469f99301563c899dcca43e81ae14a8580931fc (diff) | |
parent | ac8d316a08cffd951a883936a9966388ca3e54ee (diff) | |
download | puppet-e10ba1ab720cb62b39b430104a55a987f4c37f31.tar.gz puppet-e10ba1ab720cb62b39b430104a55a987f4c37f31.tar.xz puppet-e10ba1ab720cb62b39b430104a55a987f4c37f31.zip |
Merge branch 'bug/2.6.next/5755-gc-issue' into 2.6.next
* bug/2.6.next/5755-gc-issue:
Fix for #5755 -- making zaml serialization robust over projected objects
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/util/zaml.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/util/zaml.rb b/lib/puppet/util/zaml.rb index 14aa90e5f..b22dfc199 100644 --- a/lib/puppet/util/zaml.rb +++ b/lib/puppet/util/zaml.rb @@ -20,6 +20,7 @@ class ZAML def self.dump(stuff, where='') z = new stuff.to_zaml(z) + Label.counter_reset where << z.to_s end # @@ -61,6 +62,7 @@ class ZAML end def initialize(obj) @this_label_number = nil + @obj = obj # prevent garbage collection so that object id isn't reused @@previously_emitted_object[obj.object_id] = self end def to_s |