From 770e66030a43967a7aae1050da364ed842f1f544 Mon Sep 17 00:00:00 2001 From: aycabta Date: Fri, 28 Aug 2020 12:12:10 +0900 Subject: [ruby/reline] Use str.encoding by default for split_by_width https://github.com/ruby/reline/commit/2d32604c9e --- lib/reline/unicode.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/reline') 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 -- cgit v1.2.3