From 18320b8e3271f7d1d1702907be1ff420acfc8d2b Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 21 Mar 2008 00:39:26 -0500 Subject: Found all instances of methods where split() is used without any local variables and added a local variable -- see http://snurl.com/21zf8. My own testing showed that this caused memory growth to level off at a reasonable level. Note that the link above says the problem is only with class methods, but my own testing showed that it's any method that meets these criteria. This is not a functional change, but should hopefully be the last nail in the coffin of #1131. --- lib/puppet/resource_reference.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/puppet/resource_reference.rb') diff --git a/lib/puppet/resource_reference.rb b/lib/puppet/resource_reference.rb index 771a91be7..44b518816 100644 --- a/lib/puppet/resource_reference.rb +++ b/lib/puppet/resource_reference.rb @@ -49,7 +49,8 @@ class Puppet::ResourceReference if value.nil? or value.to_s.downcase == "component" @type = "Class" else - @type = value.to_s.split("::").collect { |s| s.capitalize }.join("::") + # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com] + x = @type = value.to_s.split("::").collect { |s| s.capitalize }.join("::") end end -- cgit