Skip to content

Commit

Permalink
remove explicit to_proc calls when passing method references
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Jan 22, 2024
1 parent 188679f commit 3527642
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/asciidoctor/pdf/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def init_pdf doc
# scratch calls init_scratch on a copy of the prototype to instantiate a scratch document
# push_scratch and pop_scratch make changes to the document catalog and attributes transactional
allocate_scratch_prototype
on_page_create(&(method :init_page).curry[doc])
on_page_create (method :init_page).curry[doc]
self
end

Expand Down Expand Up @@ -638,7 +638,7 @@ def convert_section sect, _opts = nil
return convert_abstract sect
elsif (index_section = sectname == 'index') && @index.empty?
# override numbered_title to hide entry from TOC
sect.define_singleton_method :numbered_title, &->(*) { '' }
sect.define_singleton_method :numbered_title, ->(*) { '' }
return
end
title = sect.numbered_title formal: true
Expand Down Expand Up @@ -3725,7 +3725,7 @@ def ink_running_content periphery, doc, skip = [1, 1], body_start_page_number =
# NOTE: force repeater to consult color spaces on current page instead of the page on which repeater was created
# if this stops working, use the commented code above repeat call instead
unless (repeater_graphic_state = repeaters[-1].instance_variable_get :@graphic_state).singleton_methods.include? :color_space
repeater_graphic_state.define_singleton_method :color_space, &(method :page_color_space)
repeater_graphic_state.define_singleton_method :color_space, (method :page_color_space)
end
go_to_page prev_page_number
nil
Expand Down

0 comments on commit 3527642

Please sign in to comment.