summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-05 09:49:27 +0900
committergit <svn-admin@ruby-lang.org>2023-09-05 01:14:52 +0000
commitdab6d55db115448680968da1f46194886e5eac84 (patch)
tree320776466e572aefe31cde1c6629eb3092044472 /lib
parent736092ec11c4a3e4aa643434a54b135a648765ea (diff)
[ruby/rdoc] Remove code for versions older than Ruby 2.6
https://github.com/ruby/rdoc/commit/0d10f460eb
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/erbio.rb8
-rw-r--r--lib/rdoc/generator/darkfish.rb6
2 files changed, 3 insertions, 11 deletions
diff --git a/lib/rdoc/erbio.rb b/lib/rdoc/erbio.rb
index 56c0511a3d..0f98eaedee 100644
--- a/lib/rdoc/erbio.rb
+++ b/lib/rdoc/erbio.rb
@@ -20,12 +20,8 @@ class RDoc::ERBIO < ERB
##
# 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'
- if RUBY_VERSION >= '2.6'
- super(str, trim_mode: trim_mode, eoutvar: eoutvar)
- else
- super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
- end
+ def initialize str, trim_mode: nil, eoutvar: 'io'
+ super(str, trim_mode: trim_mode, eoutvar: eoutvar)
end
##
diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb
index 7a7a95a9b9..1b408a6f8e 100644
--- a/lib/rdoc/generator/darkfish.rb
+++ b/lib/rdoc/generator/darkfish.rb
@@ -778,11 +778,7 @@ class RDoc::Generator::Darkfish
erbout = "_erbout_#{file_var}"
end
- if RUBY_VERSION >= '2.6'
- template = klass.new template, trim_mode: '-', eoutvar: erbout
- else
- template = klass.new template, nil, '-', erbout
- end
+ template = klass.new template, trim_mode: '-', eoutvar: erbout
@template_cache[file] = template
template
end