Skip to content

Commit

Permalink
Add guard against to_ary
Browse files Browse the repository at this point in the history
  • Loading branch information
360dgries committed Dec 27, 2023
1 parent c8a978f commit f28aed8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fhir_dstu2_models/bootstrap/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f28aed8

Please sign in to comment.