Skip to content

Commit f92bd66

Browse files
committed
[fix]Fixed deprecation where URI.open is no longer available via kernel open(30m)
1 parent 873d05c commit f92bd66

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/openxml/docx/package.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def initialize
5555
end
5656

5757
def embed_truetype_font(path: nil, name: nil)
58-
open(path, "rb") do |source_font|
58+
URI.open(path, "rb") do |source_font|
5959
obfuscation_data = obfuscate_font source_font
6060
data = obfuscation_data[:bytes] << source_font.read
6161
destination_font_name = "font#{fonts.fonts.count + 1}.odttf"
@@ -79,7 +79,7 @@ def embed_image(path: nil, content_type: nil, into_part: nil)
7979
content_type ||= extension_match[:extension] if extension_match
8080
return if content_type.nil?
8181

82-
open(path, "rb") do |source_image|
82+
URI.open(path, "rb") do |source_image|
8383
embed_image_data(data: source_image.read, content_type: content_type, into_part: into_part)
8484
end
8585
end

0 commit comments

Comments
 (0)