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:
parent
ae5d97ca53
commit
770e66030a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue