From 8efdc3cff0d66333972164ba9f558926417b3862 Mon Sep 17 00:00:00 2001 From: Vidar Hokstad Date: Thu, 23 Sep 2021 19:24:25 +0100 Subject: [PATCH] Handle "unused" type --- lib/X11/form.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/X11/form.rb b/lib/X11/form.rb index 90b3405..3ec0d02 100644 --- a/lib/X11/form.rb +++ b/lib/X11/form.rb @@ -38,8 +38,8 @@ module X11 packet = structs.map do |s| # fetch value of field set in initialization - value = instance_variable_get("@#{s.name}") + value = s.type == :unused ? nil : instance_variable_get("@#{s.name}") case s.type when :field if value.is_a?(BaseForm)