ruby-changes:61969
From: Nobuyoshi <ko1@a...>
Date: Sun, 28 Jun 2020 13:41:54 +0900 (JST)
Subject: [ruby-changes:61969] 44a659ad97 (master): Replace ALT_SEPARATOR with SEPARATOR also in output file name
https://git.ruby-lang.org/ruby.git/commit/?id=44a659ad97 From 44a659ad976221cfec3355e036daeb4e4942db55 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 28 Jun 2020 13:20:40 +0900 Subject: Replace ALT_SEPARATOR with SEPARATOR also in output file name To suppress warnings by Visual C. ``` ./integer.rb(5) : warning C4129: 'i' : unrecognized character escape sequence ./kernel.rb(21) : warning C4129: 'k' : unrecognized character escape sequence ``` diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb index 9d4b640..fbed9fa 100644 --- a/tool/mk_builtin_loader.rb +++ b/tool/mk_builtin_loader.rb @@ -212,7 +212,11 @@ def mk_builtin_header file https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_loader.rb#L212 f.puts 'struct rb_execution_context_struct; /* in vm_core.h */' f.puts lineno = 11 - line_file = file.gsub('\\', '/') + line_file = file + if File::ALT_SEPARATOR + line_file = line_file.tr(File::ALT_SEPARATOR, File::SEPARATOR) + ofile = ofile.tr(File::ALT_SEPARATOR, File::SEPARATOR) + end inlines.each{|cfunc_name, (body_lineno, text, params, func_name)| if String === cfunc_name -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/