Skip to content

Commit f809719

Browse files
committed
irb_info codepage mismatch
`chcp` returns different encoding
1 parent de561ca commit f809719

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/irb/cmd/info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def inspect
1818
str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty?
1919
str += "East Asian Ambiguous Width: #{Reline.ambiguous_width.inspect}\n"
2020
if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
21-
codepage = `chcp`.sub(/.*: (\d+)\n/, '\1')
21+
codepage = `chcp`.b.sub(/.*: (\d+)\n/, '\1')
2222
str += "Code page: #{codepage}\n"
2323
end
2424
str

0 commit comments

Comments
 (0)