diff --git a/lib/rubygems/psych_tree.rb b/lib/rubygems/psych_tree.rb index 7d17fc29cfe9e7..24857adb9d3c41 100644 --- a/lib/rubygems/psych_tree.rb +++ b/lib/rubygems/psych_tree.rb @@ -15,7 +15,7 @@ def visit_String(str) end def visit_Hash(o) - super(o.dup.delete_if {|_, v| v.nil? }) + super(o.compact) end # Noop this out so there are no anchors