[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
|
# HACK dubious
|
||||||
|
|
||||||
def encode! encoding
|
def encode! encoding
|
||||||
# TODO: Remove this condition after Ruby 2.2 EOL
|
@text = String.new @text, encoding: encoding
|
||||||
if RUBY_VERSION < '2.3.0'
|
|
||||||
@text = @text.force_encoding encoding
|
|
||||||
else
|
|
||||||
@text = String.new @text, encoding: encoding
|
|
||||||
end
|
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -124,12 +124,7 @@ module RDoc::Encoding
|
|||||||
if text.kind_of? RDoc::Comment
|
if text.kind_of? RDoc::Comment
|
||||||
text.encode! encoding
|
text.encode! encoding
|
||||||
else
|
else
|
||||||
# TODO: Remove this condition after Ruby 2.2 EOL
|
String.new text, encoding: encoding
|
||||||
if RUBY_VERSION < '2.3.0'
|
|
||||||
text.force_encoding encoding
|
|
||||||
else
|
|
||||||
String.new text, encoding: encoding
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user