зеркало из https://github.com/github/ruby.git
[ruby/rdoc] Remove code for versions older than Ruby 2.6
https://github.com/ruby/rdoc/commit/0d10f460eb
This commit is contained in:
Родитель
736092ec11
Коммит
dab6d55db1
|
@ -20,12 +20,8 @@ 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, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io'
|
def initialize str, trim_mode: nil, eoutvar: 'io'
|
||||||
if RUBY_VERSION >= '2.6'
|
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
||||||
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
|
||||||
else
|
|
||||||
super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -778,11 +778,7 @@ class RDoc::Generator::Darkfish
|
||||||
erbout = "_erbout_#{file_var}"
|
erbout = "_erbout_#{file_var}"
|
||||||
end
|
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
|
|
||||||
end
|
|
||||||
@template_cache[file] = template
|
@template_cache[file] = template
|
||||||
template
|
template
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче