summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-20 10:52:32 +0900
committernagachika <nagachika@ruby-lang.org>2020-07-10 08:50:41 +0900
commit06ab2791c38c431e08bc8d9381c9a1ca727297c4 (patch)
tree84f8b8fd015a78b29eb1a8d36bddeefc4cc4df59
parent1ee1684a4a3edb26b5aa32acc967b9ef26284d42 (diff)
pure_parser.rb: get rid of an error at localed messages
-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 59e8fb7757..dfd66ffc84 100755
--- a/tool/pure_parser.rb
+++ b/tool/pure_parser.rb
@@ -1,11 +1,14 @@
#!/usr/bin/ruby -pi
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