[前][次][番号順一覧][スレッド一覧]

ruby-changes:62896

From: aycabta <ko1@a...>
Date: Sat, 12 Sep 2020 08:38:47 +0900 (JST)
Subject: [ruby-changes:62896] 770e66030a (master): [ruby/reline] Use str.encoding by default for split_by_width

https://git.ruby-lang.org/ruby.git/commit/?id=770e66030a

From 770e66030a43967a7aae1050da364ed842f1f544 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
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

diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb
index 3b5ef6f..cd8c27e 100644
--- a/lib/reline/unicode.rb
+++ b/lib/reline/unicode.rb
@@ -117,7 +117,7 @@ class Reline::Unicode https://github.com/ruby/ruby/blob/trunk/lib/reline/unicode.rb#L117
     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 v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]