summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hoe/debug.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/hoe/debug.rb b/lib/hoe/debug.rb
index 67be47b..7f36233 100644
--- a/lib/hoe/debug.rb
+++ b/lib/hoe/debug.rb
@@ -96,3 +96,18 @@ module Hoe::Debug
end
end
end
+
+class Gem::Specification < Gem::BasicSpecification
+ alias old_ruby_code ruby_code
+
+ def ruby_code(obj)
+ old_ruby_code obj
+ rescue Gem::Exception => e
+ case e.message
+ when /OpenSSL/
+ "nil"
+ else
+ raise
+ end
+ end
+end unless Gem::VERSION >= "3.1.0"