1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Use str.encoding by default for split_by_width

https://github.com/ruby/reline/commit/2d32604c9e
This commit is contained in:
aycabta 2020-08-28 12:12:10 +09:00
parent ae5d97ca53
commit 770e66030a

View file

@ -117,7 +117,7 @@ class Reline::Unicode
end
end
def self.split_by_width(str, max_width, encoding)
def self.split_by_width(str, max_width, encoding = str.encoding)
lines = [String.new(encoding: encoding)]
height = 1
width = 0