From 4fcf8c071fd7d238ad1d9a04e5126b09ff4ec379 Mon Sep 17 00:00:00 2001 From: Leandro Machado Pereira Date: Thu, 6 Jun 2024 19:29:07 -0300 Subject: [PATCH] feat: allow ActiveSupport::HashWithIndifferentAccess of yaml parse --- lib/dynamoid/undumping.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dynamoid/undumping.rb b/lib/dynamoid/undumping.rb index 76e7a114..1ba0f072 100644 --- a/lib/dynamoid/undumping.rb +++ b/lib/dynamoid/undumping.rb @@ -256,7 +256,9 @@ def process(value) # String # Array # Hash - YAML.safe_load(value, permitted_classes: [Symbol, Set, Date, Time, DateTime]) + YAML.safe_load(value, permitted_classes: [ + Symbol, Set, Date, Time, DateTime, ActiveSupport::HashWithIndifferentAccess + ]) else YAML.load(value) end