ruby-changes:25742
From: kosaki <ko1@a...>
Date: Thu, 22 Nov 2012 17:41:29 +0900 (JST)
Subject: [ruby-changes:25742] kosaki:r37799 (trunk): * tool/gen_dummy_probes.rb: don't change #include, #if and #endif
kosaki 2012-11-22 17:41:19 +0900 (Thu, 22 Nov 2012) New Revision: 37799 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37799 Log: * tool/gen_dummy_probes.rb: don't change #include, #if and #endif lines. [Bug #7370] Modified files: trunk/ChangeLog trunk/tool/gen_dummy_probes.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 37798) +++ ChangeLog (revision 37799) @@ -1,3 +1,8 @@ +Thu Nov 22 17:39:37 2012 KOSAKI Motohiro <kosaki.motohiro@g...> + + * tool/gen_dummy_probes.rb: don't change #include, #if and #endif + lines. [Bug #7370] + Thu Nov 22 16:58:26 2012 KOSAKI Motohiro <kosaki.motohiro@g...> * Makefile.in: run preprocessor when making probe.h Index: tool/gen_dummy_probes.rb =================================================================== --- tool/gen_dummy_probes.rb (revision 37798) +++ tool/gen_dummy_probes.rb (revision 37799) @@ -2,10 +2,10 @@ # -*- coding: us-ascii -*- text = ARGF.read -text.upcase! +text.gsub!(/^(?!#)(.*)/){$1.upcase} # remove the pragma declarations -text.gsub!(/^#PRAGMA.*$/, '') +text.gsub!(/^#pragma.*$/, '') # replace the provider section with the start of the header file text.gsub!(/PROVIDER RUBY \{/, "#ifndef\t_PROBES_H\n#define\t_PROBES_H\n#define DTRACE_PROBES_DISABLED 1\n") @@ -23,3 +23,4 @@ text.gsub!(/ *PROBE ([^\(]*)(\([^\)]*\));/, "#define RUBY_DTRACE_\\1_ENABLED() 0\n#define RUBY_DTRACE_\\1\\2\ do \{ \} while\(0\)") print text + -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/