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

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
```
This commit is contained in:
Nobuyoshi Nakada 2020-06-28 13:20:40 +09:00
parent 48fb6299c6
commit 44a659ad97
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -212,7 +212,11 @@ def mk_builtin_header file
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