From de0558a35f10812f0b90b6cb8f2f265d51e8ce95 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Wed, 21 Jun 2017 09:55:23 +0100 Subject: [PATCH] Don't call `keys` on strings in `deep_intersect` Fixes #204 --- lib/puppet_x/wildfly/deep_hash.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet_x/wildfly/deep_hash.rb b/lib/puppet_x/wildfly/deep_hash.rb index 87b632f6..2ff88dd6 100644 --- a/lib/puppet_x/wildfly/deep_hash.rb +++ b/lib/puppet_x/wildfly/deep_hash.rb @@ -5,7 +5,7 @@ def _deep_intersect(current_state, desired_state) diff = {} current_state.each do |key, value| - next unless desired_state.keys.include? key + next unless desired_state.is_a? Hash and desired_state.keys.include? key diff[key] = if value.is_a? Hash _deep_intersect(value, desired_state[key]) else