mirror of
https://github.com/anteo/redmine_custom_workflows.git
synced 2026-01-26 00:04:20 +00:00
IssueRelation.to_s is broken #258
This commit is contained in:
parent
c1bbf4383f
commit
7014008246
@ -36,7 +36,15 @@ 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)
|
if block_given?
|
||||||
|
if Gem.ruby_version < Gem::Version.new('3.0')
|
||||||
|
old_to_s issue, &Proc.new
|
||||||
|
else
|
||||||
|
old_to_s issue, &Proc.new {}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
old_to_s issue
|
||||||
|
end
|
||||||
rescue NoMethodError => e
|
rescue NoMethodError => e
|
||||||
if issue_from.present? || issue_to.present?
|
if issue_from.present? || issue_to.present?
|
||||||
raise e
|
raise e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user