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

ruby-changes:70500

From: YO4 <ko1@a...>
Date: Fri, 24 Dec 2021 10:32:22 +0900 (JST)
Subject: [ruby-changes:70500] de0523fedd (master): [ruby/irb] irb_info codepage mismatch

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

From de0523feddf740d28fe772f3a22ff9907f88bf69 Mon Sep 17 00:00:00 2001
From: YO4 <ysno@a...>
Date: Fri, 24 Dec 2021 01:54:09 +0900
Subject: [ruby/irb] irb_info codepage mismatch

`chcp` returns different encoding

https://github.com/ruby/irb/commit/f80971994a
---
 lib/irb/cmd/info.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/irb/cmd/info.rb b/lib/irb/cmd/info.rb
index a2f2a27cecf..dd93352ff00 100644
--- a/lib/irb/cmd/info.rb
+++ b/lib/irb/cmd/info.rb
@@ -18,7 +18,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/cmd/info.rb#L18
             str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty?
             str += "East Asian Ambiguous Width: #{Reline.ambiguous_width.inspect}\n"
             if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
-              codepage = `chcp`.sub(/.*: (\d+)\n/, '\1')
+              codepage = `chcp`.b.sub(/.*: (\d+)\n/, '\1')
               str += "Code page: #{codepage}\n"
             end
             str
-- 
cgit v1.2.1


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

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