ruby-changes:58646
From: Nobuyoshi <ko1@a...>
Date: Fri, 8 Nov 2019 16:37:57 +0900 (JST)
Subject: [ruby-changes:58646] 2e29b65109 (master): Add file mode to generated files [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=2e29b65109 From 2e29b651093d158c23f6553972769c8ccb7dbd94 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 8 Nov 2019 16:37:42 +0900 Subject: Add file mode to generated files [ci skip] diff --git a/tool/mk_builtin_binary.rb b/tool/mk_builtin_binary.rb index a5c962d..eaa560f 100644 --- a/tool/mk_builtin_binary.rb +++ b/tool/mk_builtin_binary.rb @@ -17,6 +17,13 @@ RubyVM::each_builtin{|feature, iseq| https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_binary.rb#L17 $stdout = open('builtin_binary.inc', 'wb') +puts <<H +// -*- c -*- +// DO NOT MODIFY THIS FILE DIRECTLY. +// auto-generated file by #{File.basename(__FILE__)} + +H + ary.each{|feature, iseq| puts "static const unsigned char #{feature}_bin[] = {" dump_bin(iseq) diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb index aa8e46d..cea4d1f 100644 --- a/tool/mk_builtin_loader.rb +++ b/tool/mk_builtin_loader.rb @@ -36,6 +36,7 @@ def mk_builtin_header file https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_loader.rb#L36 collect_builtin(RubyVM::InstructionSequence.compile_file(file, false).to_a, bs = {}) open(ofile, 'w'){|f| + f.puts "// -*- c -*-" f.puts "// DO NOT MODIFY THIS FILE DIRECTLY." f.puts "// auto-generated file" f.puts "// by #{__FILE__}" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/