Skip to content

Commit

Permalink
resolves asciidoctor#1477 fix warning when reading data from a remote…
Browse files Browse the repository at this point in the history
… URL when running with Ruby 2.7
  • Loading branch information
mojavelinux committed Jan 8, 2020
1 parent 88a98a2 commit 0727dbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[

* patch Prawn to fix incompatibilty with Ruby 2.7
* fix crash when assigning font style to header cell in table body (#1468)
* fix warning when reading data from a remote URL when running with Ruby 2.7 (#1477)

== 1.5.0.rc.1 (2020-01-06) - @mojavelinux

Expand Down
4 changes: 2 additions & 2 deletions lib/asciidoctor/pdf/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ def convert_video node
else
::OpenURI
end
poster = open %(http://vimeo.com/api/v2/video/#{video_id}.xml), 'r' do |f|
poster = ::OpenURI.open_uri %(http://vimeo.com/api/v2/video/#{video_id}.xml), 'r' do |f|
/<thumbnail_large>(.*?)<\/thumbnail_large>/ =~ f.read && $1
end
end
Expand Down Expand Up @@ -4026,7 +4026,7 @@ def resolve_image_path node, image_path = nil, relative_to_imagesdir = true, ima
tmp_image = ::Tempfile.create ['image-', image_format && %(.#{image_format})]
tmp_image.binmode if (binary = image_format != 'svg')
begin
open(image_path, (binary ? 'rb' : 'r')) {|fd| tmp_image.write fd.read }
::OpenURI.open_uri(image_path, (binary ? 'rb' : 'r')) {|fd| tmp_image.write fd.read }
tmp_image.path.extend TemporaryPath
rescue
logger.warn %(could not retrieve remote image: #{image_path}; #{$!.message}) unless scratch?
Expand Down

0 comments on commit 0727dbb

Please sign in to comment.