From f28aed8a117b1ce9cb5f8445f4ace61d1b53c7bf Mon Sep 17 00:00:00 2001 From: 360dgries Date: Wed, 27 Dec 2023 13:48:02 -0500 Subject: [PATCH] Add guard against to_ary --- lib/fhir_dstu2_models/bootstrap/model.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fhir_dstu2_models/bootstrap/model.rb b/lib/fhir_dstu2_models/bootstrap/model.rb index bd11f83..a4a6a96 100644 --- a/lib/fhir_dstu2_models/bootstrap/model.rb +++ b/lib/fhir_dstu2_models/bootstrap/model.rb @@ -24,9 +24,9 @@ def hash end def respond_to_missing?(method_name, *) - defined?(self.class::MULTIPLE_TYPES) && self.class::MULTIPLE_TYPES[method_name.to_s] || - !@extension.nil? && !@extension.empty? || - !@modifierExtension.nil? && !@modifierExtension.empty? || + (defined?(self.class::MULTIPLE_TYPES) && self.class::MULTIPLE_TYPES[method_name.to_s]) || + (!@extension.nil? && !@extension.empty? && !@extension.respond_to?(:to_ary)) || + (!@modifierExtension.nil? && !@modifierExtension.empty? && !@modifierExtension.respond_to?(:to_ary)) || super end