aboutsummaryrefslogtreecommitdiffstats
path: root/tool/pure_parser.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-20 10:52:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-20 10:52:32 +0900
commit2480ef904c66812cf366e5d9bc8a9c3c20bbf271 (patch)
treeedb86aa3ef40a8d3e8a5c4e9db32949e8f0b1467 /tool/pure_parser.rb
parent67d259c5dccd31fe49d417fec169977712ffdf10 (diff)
downloadruby-2480ef904c66812cf366e5d9bc8a9c3c20bbf271.tar.gz
pure_parser.rb: get rid of an error at localed messages
Diffstat (limited to 'tool/pure_parser.rb')
-rwxr-xr-xtool/pure_parser.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/pure_parser.rb b/tool/pure_parser.rb
index d07df681be..21c87cc5d6 100755
--- a/tool/pure_parser.rb
+++ b/tool/pure_parser.rb
@@ -1,11 +1,14 @@
#!/usr/bin/ruby -pi.bak
BEGIN {
+ # pathological setting
+ ENV['LANG'] = ENV['LC_MESSAGES'] = ENV['LC_ALL'] = 'C'
+
require_relative 'lib/colorize'
colorize = Colorize.new
file = ARGV.shift
begin
- version = IO.popen(ARGV+%w[--version], &:read)
+ version = IO.popen(ARGV+%w[--version], "rb", &:read)
rescue Errno::ENOENT
abort "Failed to run `#{colorize.fail ARGV.join(' ')}'; You may have to install it."
end