Tried to create Proc object without a block #257

This commit is contained in:
Karel Pičman 2022-05-05 10:09:57 +02:00
parent 36e8b4d27e
commit c1bbf4383f

View File

@ -36,7 +36,7 @@ module RedmineCustomWorkflows
alias_method :old_to_s, :to_s alias_method :old_to_s, :to_s
def to_s(issue=nil) def to_s(issue=nil)
block_given? ? old_to_s(issue, &Proc.new) : old_to_s(issue) block_given? ? old_to_s(issue, &Proc.new {}) : old_to_s(issue)
rescue NoMethodError => e rescue NoMethodError => e
if issue_from.present? || issue_to.present? if issue_from.present? || issue_to.present?
raise e raise e