~singpolyma/dhall-ruby

6734ac75d46d6a72572c03e89d55c0b91eba4d26 — Stephen Paul Weber 5 years ago 7274a86
nil hash values are omitted from record
1 files changed, 5 insertions(+), 1 deletions(-)

M lib/dhall/as_dhall.rb
M lib/dhall/as_dhall.rb => lib/dhall/as_dhall.rb +5 -1
@@ 158,7 158,11 @@ module Dhall
				if empty?
					EmptyRecord.new
				else
					Record.new(record: Hash[map { |k, v| [k.to_s, v.as_dhall] }.sort])
					Record.new(record: Hash[
						reject { |_, v| v.nil? }
						.map { |k, v| [k.to_s, v.as_dhall] }
						.sort
					])
				end
			end
		end