[ruby/rdoc] Delegate ERB args correctly

https://github.com/ruby/rdoc/commit/82ff37a822
This commit is contained in:
aycabta 2020-04-01 05:18:54 +09:00
parent 7e7981c84f
commit 32e0ff26e0
2 changed files with 4 additions and 4 deletions

View File

@ -20,11 +20,11 @@ class RDoc::ERBIO < ERB
##
# Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize
def initialize str, safe_level = nil, trim_mode = nil, eoutvar = 'io'
def initialize str, safe_level = nil, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io'
if RUBY_VERSION >= '2.6'
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
else
super
super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
end
end

View File

@ -779,9 +779,9 @@ class RDoc::Generator::Darkfish
end
if RUBY_VERSION >= '2.6'
template = klass.new template, trim_mode: '<>', eoutvar: erbout
template = klass.new template, trim_mode: '-', eoutvar: erbout
else
template = klass.new template, nil, '<>', erbout
template = klass.new template, nil, '-', erbout
end
@template_cache[file] = template
template