[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.4-89-gcbbd363

James Turnbull james at lovedthanlost.net
Tue May 18 09:04:25 UTC 2010


The following commit has been merged in the upstream branch:
commit ae0b0bf23e418e8c6665e9dc135148b78bdbd913
Author: Markus Roberts <Markus at reality.com>
Date:   Tue Mar 30 14:34:01 2010 -0700

    Fix for #3101 (bug in MRI 1.8.7)
    
    Due to a bug in Ruby 1.8.7 net/http will attempt to close a connection
    that wasn't successfully opened (it's nil), first checking to see if the
    connection is already close, and thus raising a method missing exception.
    This bug causes error messages that are confusing / misleading.
    
    To get around this, we add a closed? method to nil such that a nil (unopened)
    connection is always considered closed, allowing the real problem to be
    reported.

diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
index c93d6ff..459fd74 100644
--- a/lib/puppet/util/monkey_patches.rb
+++ b/lib/puppet/util/monkey_patches.rb
@@ -31,5 +31,16 @@ def YAML.dump(*args)
     ZAML.dump(*args)
 end
 
-
+#
+# Workaround for bug in MRI 1.8.7, see
+#     http://redmine.ruby-lang.org/issues/show/2708
+# for details
+#
+if RUBY_VERSION == '1.8.7'
+    class NilClass
+        def closed?
+            true
+        end
+    end
+end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list