[前][次][番号順一覧][スレッド一覧]

ruby-changes:34606

From: nobu <ko1@a...>
Date: Fri, 4 Jul 2014 14:17:09 +0900 (JST)
Subject: [ruby-changes:34606] nobu:r46687 (trunk): compile_prelude.rb: remove comments

nobu	2014-07-04 14:17:04 +0900 (Fri, 04 Jul 2014)

  New Revision: 46687

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46687

  Log:
    compile_prelude.rb: remove comments
    
    * tool/compile_prelude.rb (translate): remove comments which are
      not used in compiled sources.

  Modified files:
    trunk/tool/compile_prelude.rb
Index: tool/compile_prelude.rb
===================================================================
--- tool/compile_prelude.rb	(revision 46686)
+++ tool/compile_prelude.rb	(revision 46687)
@@ -45,6 +45,7 @@ class Prelude https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L45
     lines = []
     @preludes[filename] = result = [@preludes.size, filename, lines, sub]
     File.readlines(filename).each do |line|
+      line.sub!(/(?:^|\s+)\#(?:$|\s.*)/, '')
       line.gsub!(/RbConfig::CONFIG\["(\w+)"\]/) {
         key = $1
         unless @mkconf

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]