[ruby/rdoc] Remove code for versions older than Ruby 2.3
https://github.com/ruby/rdoc/commit/a61b777df0
This commit is contained in:
parent
3f6c92e9d5
commit
736092ec11
@ -133,12 +133,7 @@ class RDoc::Comment
|
||||
# HACK dubious
|
||||
|
||||
def encode! encoding
|
||||
# TODO: Remove this condition after Ruby 2.2 EOL
|
||||
if RUBY_VERSION < '2.3.0'
|
||||
@text = @text.force_encoding encoding
|
||||
else
|
||||
@text = String.new @text, encoding: encoding
|
||||
end
|
||||
@text = String.new @text, encoding: encoding
|
||||
self
|
||||
end
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user