test/hexapdf/test_dictionary.rb in hexapdf-0.12.3 vs test/hexapdf/test_dictionary.rb in hexapdf-0.13.0
- old
+ new
@@ -12,10 +12,12 @@
obj
end
end
def add(obj)
- HexaPDF::Object.new(obj, oid: 1)
+ klass = HexaPDF::Object
+ klass = HexaPDF::Dictionary if obj.kind_of?(HexaPDF::Dictionary) || obj.kind_of?(Hash)
+ klass.new(obj, oid: 1)
end
def delete(_obj)
end