1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Replace separators in input file name in header too

This commit is contained in:
Nobuyoshi Nakada 2020-06-28 14:12:26 +09:00
parent 44a659ad97
commit 1020f7e3aa
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -200,6 +200,10 @@ def mk_builtin_header file
f = open(File.basename(ofile), 'w') f = open(File.basename(ofile), 'w')
end end
begin 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 "// -*- c -*-"
f.puts "// DO NOT MODIFY THIS FILE DIRECTLY." f.puts "// DO NOT MODIFY THIS FILE DIRECTLY."
f.puts "// auto-generated file" f.puts "// auto-generated file"
@ -213,10 +217,6 @@ def mk_builtin_header file
f.puts f.puts
lineno = 11 lineno = 11
line_file = file 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)| inlines.each{|cfunc_name, (body_lineno, text, params, func_name)|
if String === cfunc_name if String === cfunc_name