aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/encoding.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-05 09:48:11 +0900
committergit <svn-admin@ruby-lang.org>2023-09-05 01:14:51 +0000
commit736092ec11c4a3e4aa643434a54b135a648765ea (patch)
tree568db177d8a8f0959a6162e6f6a5181238025c1b /lib/rdoc/encoding.rb
parent3f6c92e9d592a2b122fb2260fccee7a7dd850cb8 (diff)
downloadruby-736092ec11c4a3e4aa643434a54b135a648765ea.tar.gz
[ruby/rdoc] Remove code for versions older than Ruby 2.3
https://github.com/ruby/rdoc/commit/a61b777df0
Diffstat (limited to 'lib/rdoc/encoding.rb')
-rw-r--r--lib/rdoc/encoding.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/rdoc/encoding.rb b/lib/rdoc/encoding.rb
index cf60badd24..8a921c7011 100644
--- a/lib/rdoc/encoding.rb
+++ b/lib/rdoc/encoding.rb
@@ -124,12 +124,7 @@ module RDoc::Encoding
if text.kind_of? RDoc::Comment
text.encode! encoding
else
- # TODO: Remove this condition after Ruby 2.2 EOL
- if RUBY_VERSION < '2.3.0'
- text.force_encoding encoding
- else
- String.new text, encoding: encoding
- end
+ String.new text, encoding: encoding
end
end