~singpolyma/dhall-ruby

ca1df3d1143ff1e7d784c577b1db338b87ee61b6 — Stephen Paul Weber 3 years ago 6734ac7
Fix to_cbor usage
1 files changed, 7 insertions(+), 2 deletions(-)

M lib/dhall/binary.rb
M lib/dhall/binary.rb => lib/dhall/binary.rb +7 -2
@@ 26,8 26,13 @@ module Dhall
			new(*args)
		end

		def to_cbor(io=nil)
			CBOR.encode(as_json, io)
		def to_cbor(packer=nil)
			if packer
				packer.write(as_json)
				packer
			else
				CBOR.encode(as_json)
			end
		end
		alias to_binary to_cbor