diff options
author | YO4 <ysno@ac.auone-net.jp> | 2021-12-24 01:54:09 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-24 10:32:14 +0900 |
commit | de0523feddf740d28fe772f3a22ff9907f88bf69 (patch) | |
tree | c0148779b229b4299bc4012ba4404ce21ee87e03 /lib/irb | |
parent | 34deea3b42189cd46e88f4a459bd4fc58940aa60 (diff) |
[ruby/irb] irb_info codepage mismatch
`chcp` returns different encoding
https://github.com/ruby/irb/commit/f80971994a
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/cmd/info.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/cmd/info.rb b/lib/irb/cmd/info.rb index a2f2a27cec..dd93352ff0 100644 --- a/lib/irb/cmd/info.rb +++ b/lib/irb/cmd/info.rb @@ -18,7 +18,7 @@ module IRB 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 |