[ruby/rdoc] Delegate ERB args correctly
https://github.com/ruby/rdoc/commit/82ff37a822
This commit is contained in:
parent
7e7981c84f
commit
32e0ff26e0
@ -20,11 +20,11 @@ class RDoc::ERBIO < ERB
|
|||||||
##
|
##
|
||||||
# Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize
|
# 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'
|
if RUBY_VERSION >= '2.6'
|
||||||
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
||||||
else
|
else
|
||||||
super
|
super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -779,9 +779,9 @@ class RDoc::Generator::Darkfish
|
|||||||
end
|
end
|
||||||
|
|
||||||
if RUBY_VERSION >= '2.6'
|
if RUBY_VERSION >= '2.6'
|
||||||
template = klass.new template, trim_mode: '<>', eoutvar: erbout
|
template = klass.new template, trim_mode: '-', eoutvar: erbout
|
||||||
else
|
else
|
||||||
template = klass.new template, nil, '<>', erbout
|
template = klass.new template, nil, '-', erbout
|
||||||
end
|
end
|
||||||
@template_cache[file] = template
|
@template_cache[file] = template
|
||||||
template
|
template
|
||||||
|
Loading…
x
Reference in New Issue
Block a user