From 362ba6d0e085bf5455000d23edb1d7dfd16b2967 Mon Sep 17 00:00:00 2001 From: kwatch Date: Sat, 19 Nov 2016 09:30:09 +0900 Subject: [PATCH 6/9] feat(psych): refactor hook point methods for merge ('<<') --- ext/psych/lib/psych/visitors/to_ruby.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index f96ca98..9d30991 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -382,9 +382,9 @@ def merge_mapping hash, val def merge_sequence hash, val h = {} val.reverse_each do |value| - h.merge! value + merge_mapping(h, value) end - hash.merge! h + merge_mapping(hash, h) end def merge_key hash, key, val -- 2.9.3 (Apple Git-75)