summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/visitors/to_ruby.rb
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2021-02-25 18:36:15 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-17 11:20:45 +0900
commita3ceed50b877e57554ec825d7fefe066c81ff0ee (patch)
treebc4cc66f9012bb1cc26efab792e820054813f644 /ext/psych/lib/psych/visitors/to_ruby.rb
parent830778db95c1dca5dfad591eae5176d3133bf7ee (diff)
[ruby/psych] Fix symabolize_name with non-string keys
https://github.com/ruby/psych/commit/1c5c29e81f
Diffstat (limited to 'ext/psych/lib/psych/visitors/to_ruby.rb')
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb
index 4d98850f758..4de7f80d337 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)