Skip to content

Commit 9235011

Browse files
satoryuWaKeMaTTa
andauthored
Update lib/docx/document.rb
Co-Authored-By: Mohamed Ziata <wakematta@gmail.com>
1 parent 52b6027 commit 9235011

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/docx/document.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ def initialize(path_or_io, options = {})
3737
@document_xml = document.get_input_stream.read
3838
@doc = Nokogiri::XML(@document_xml)
3939
load_styles
40-
return unless block_given?
41-
42-
yield self
40+
yield(self) if block_given?
41+
ensure
4342
@zip.close
4443
end
4544

0 commit comments

Comments
 (0)