ruby-changes:61971
From: Nobuyoshi <ko1@a...>
Date: Sun, 28 Jun 2020 14:16:43 +0900 (JST)
Subject: [ruby-changes:61971] 1020f7e3aa (master): Replace separators in input file name in header too
https://git.ruby-lang.org/ruby.git/commit/?id=1020f7e3aa From 1020f7e3aaad9071d59df19c3377c3462af13f7c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 28 Jun 2020 14:12:26 +0900 Subject: Replace separators in input file name in header too diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb index fbed9fa..16956c6 100644 --- a/tool/mk_builtin_loader.rb +++ b/tool/mk_builtin_loader.rb @@ -200,6 +200,10 @@ def mk_builtin_header file https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_loader.rb#L200 f = open(File.basename(ofile), 'w') end begin + if File::ALT_SEPARATOR + file = file.tr(File::ALT_SEPARATOR, File::SEPARATOR) + ofile = ofile.tr(File::ALT_SEPARATOR, File::SEPARATOR) + end f.puts "// -*- c -*-" f.puts "// DO NOT MODIFY THIS FILE DIRECTLY." f.puts "// auto-generated file" @@ -213,10 +217,6 @@ def mk_builtin_header file https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_loader.rb#L217 f.puts lineno = 11 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/