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

ruby-changes:38735

From: nobu <ko1@a...>
Date: Thu, 11 Jun 2015 00:35:01 +0900 (JST)
Subject: [ruby-changes:38735] nobu:r50816 (trunk): fake.rb.in: match spaces

nobu	2015-06-11 00:34:42 +0900 (Thu, 11 Jun 2015)

  New Revision: 50816

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

  Log:
    fake.rb.in: match spaces
    
    * template/fake.rb.in: expanded macro result may have spaces
      between tokens.  [ruby-dev:49047] [Bug #11243]

  Modified files:
    trunk/ChangeLog
    trunk/template/fake.rb.in
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50815)
+++ ChangeLog	(revision 50816)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jun 11 00:34:39 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* template/fake.rb.in: expanded macro result may have spaces
+	  between tokens.  [ruby-dev:49047] [Bug #11243]
+
 Wed Jun 10 22:27:32 2015  Naohisa Goto  <ngotogenome@g...>
 
 	* lib/mkmf.rb: revert r50804 because of build failure when specifying
Index: template/fake.rb.in
===================================================================
--- template/fake.rb.in	(revision 50815)
+++ template/fake.rb.in	(revision 50816)
@@ -8,8 +8,8 @@ end https://github.com/ruby/ruby/blob/trunk/template/fake.rb.in#L8
 if arg['i']
   src = File.read(arg['i'])
   arg['versions'] = version = {}
-  src.scan(/rb_define_global_const\("(RUBY_\w+)",\s*(?:.*rb_\w*str_new\w*\((\w+)|\(*\(VALUE\)\((.+)\)\)\s*<<\s?)/) do |n, s, i|
-    version[n] = i ? i.to_i : src[/\b#{s}\[\]\s*=\s*((?:"(?:\\.|[^\"\\])*"\s*)*);/m, 1].gsub(/\A"|"\z|" *"/, '').gsub(/\\(.)/, '\1')
+  src.scan(/rb_define_global_const\("(RUBY_\w+)",\s*(?:.*rb_\w*str_new\w*\s*\(\s*(\w+)|[\(\s]*\(\s*VALUE\s*\)\s*\((.+)\)\s*\)\s*<<\s?)/) do |n, s, i|
+    version[n] = i ? i.gsub(/\s+/, '').to_i : src[/\b#{s}\[\]\s*=\s*((?:"(?:\\.|[^\"\\])*"\s*)*);/m, 1].gsub(/\A"|"\s*\z|" *"/, '').gsub(/\\(.)/, '\1')
   end
 end
 %>baseruby="<%=arg['BASERUBY']%>"

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

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