From dddfa903d2b856146f05ffb4415c31d6127bb5bf Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 14 Jan 2019 01:40:56 -0500 Subject: New upstream version 2.8.0 --- lib/roo/excelx/relationships.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/roo/excelx/relationships.rb') diff --git a/lib/roo/excelx/relationships.rb b/lib/roo/excelx/relationships.rb index 8a0ed97..19f9919 100644 --- a/lib/roo/excelx/relationships.rb +++ b/lib/roo/excelx/relationships.rb @@ -16,9 +16,9 @@ module Roo def extract_relationships return [] unless doc_exists? - Hash[doc.xpath('/Relationships/Relationship').map do |rel| - [rel.attribute('Id').text, rel] - end] + doc.xpath('/Relationships/Relationship').each_with_object({}) do |rel, hash| + hash[rel['Id']] = rel + end end end end -- cgit v1.2.3