From a3ceed50b877e57554ec825d7fefe066c81ff0ee Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 25 Feb 2021 18:36:15 +0100 Subject: [ruby/psych] Fix symabolize_name with non-string keys https://github.com/ruby/psych/commit/1c5c29e81f --- ext/psych/lib/psych/visitors/to_ruby.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/psych') diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index 4d98850f75..4de7f80d33 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -366,7 +366,7 @@ module Psych hash[key] = val end else - if !tagged && @symbolize_names + if !tagged && @symbolize_names && key.is_a?(String) key = key.to_sym elsif !@freeze key = deduplicate(key) -- cgit v1.2.3