From 261dca2ee20b8f02d651642a79aef9869a69d587 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 17 Jul 2021 19:49:32 +0900 Subject: [PATCH] [ruby/irb] Support non-English code page message https://github.com/ruby/irb/commit/e7d71fea46 --- 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 2f3fef16ca..8ad0c2a438 100644 --- a/lib/irb/cmd/info.rb +++ b/lib/irb/cmd/info.rb @@ -17,7 +17,7 @@ module IRB str += "LANG env: #{ENV["LANG"]}\n" if ENV["LANG"] && !ENV["LANG"].empty? str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty? if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/ - codepage = `chcp`.sub(/Active code page: (\d+)\n/, '\1') + codepage = `chcp`.sub(/.*: (\d+)\n/, '\1') str += "Code page: #{codepage}\n" end str