diff options
author | aycabta <[email protected]> | 2020-08-28 12:12:10 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-09-12 08:35:51 +0900 |
commit | 770e66030a43967a7aae1050da364ed842f1f544 (patch) | |
tree | bfdd4b496a248e1f651daebd39ead1b17c7ef040 /lib/reline/unicode.rb | |
parent | ae5d97ca53b9a68af5deef609a44487f55f5715e (diff) |
[ruby/reline] Use str.encoding by default for split_by_width
https://github.com/ruby/reline/commit/2d32604c9e
Diffstat (limited to 'lib/reline/unicode.rb')
-rw-r--r-- | lib/reline/unicode.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb index 3b5ef6fb99..cd8c27e85b 100644 --- a/lib/reline/unicode.rb +++ b/lib/reline/unicode.rb @@ -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 |