From c596115be922aec63012a14f25059d7a3a64573d Mon Sep 17 00:00:00 2001 From: Matias Flores Date: Sun, 27 Sep 2009 18:01:23 -0300 Subject: [PATCH] Prefer tap to returning in ActiveSupport --- .../lib/active_support/xml_mini/libxml.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/activesupport/lib/active_support/xml_mini/libxml.rb b/activesupport/lib/active_support/xml_mini/libxml.rb index 2ae22c3..c49d687 100644 --- a/activesupport/lib/active_support/xml_mini/libxml.rb +++ b/activesupport/lib/active_support/xml_mini/libxml.rb @@ -107,7 +107,7 @@ module LibXML #:nodoc: # Hash to merge the array into def children_array_to_hash(hash={}) hash[child.name] = map do |child| - returning({}) { |sub_hash| child.children_to_hash(sub_hash) } + {}.tap { |sub_hash| child.children_to_hash(sub_hash) } end hash end -- 1.6.0.4