[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5-303-gfcfa26a

Matt Robinson matt at puppetlabs.com
Thu Mar 17 10:48:30 UTC 2011


The following commit has been merged in the upstream branch:
commit 8cc390caa18e3b536869f0591d529d8ade76fc49
Author: Matt Robinson <matt at puppetlabs.com>
Date:   Mon Feb 28 16:37:22 2011 -0800

    (#5466) Monkey patch Symbol so that you can sort them
    
    It turns out that the ability to sort symbols comes in the preinit
    section of application run when we load Facter and hit the code that
    adds the <=> method for symbols in lib/facter/util/plist/generator.rb
    
    Reviewed-by: Nick Lewis <nick at puppetlabs.com>

diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
index 85854a0..1638485 100644
--- a/lib/puppet/util/monkey_patches.rb
+++ b/lib/puppet/util/monkey_patches.rb
@@ -21,6 +21,9 @@ class Symbol
     z.emit("!ruby/sym ")
     to_s.to_zaml(z)
   end
+  def <=> (other)
+    self.to_s <=> other.to_s
+  end
 end
 
 [Object, Exception, Integer, Struct, Date, Time, Range, Regexp, Hash, Array, Float, String, FalseClass, TrueClass, Symbol, NilClass, Class].each { |cls|

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list