mirror of
https://github.com/vidarh/ruby-x11
synced 2024-12-26 09:59:02 +01:00
Handle "unused" type
This commit is contained in:
parent
ad16950b18
commit
8efdc3cff0
1 changed files with 1 additions and 1 deletions
|
@ -38,8 +38,8 @@ module X11
|
||||||
|
|
||||||
packet = structs.map do |s|
|
packet = structs.map do |s|
|
||||||
# fetch value of field set in initialization
|
# 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
|
case s.type
|
||||||
when :field
|
when :field
|
||||||
if value.is_a?(BaseForm)
|
if value.is_a?(BaseForm)
|
||||||
|
|
Loading…
Reference in a new issue