ruby-changes:66847
From: aycabta <ko1@a...>
Date: Tue, 20 Jul 2021 20:36:39 +0900 (JST)
Subject: [ruby-changes:66847] 261dca2ee2 (master): [ruby/irb] Support non-English code page message
https://git.ruby-lang.org/ruby.git/commit/?id=261dca2ee2 From 261dca2ee20b8f02d651642a79aef9869a69d587 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sat, 17 Jul 2021 19:49:32 +0900 Subject: [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 2f3fef1..8ad0c2a 100644 --- a/lib/irb/cmd/info.rb +++ b/lib/irb/cmd/info.rb @@ -17,7 +17,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/cmd/info.rb#L17 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/