summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 15:34:42 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 15:34:42 (GMT)
commit9ddccb154e04158771e52a914aea85aca373c03c (patch)
treef6589d3e0c135eb2bdfa58239f38f48690759f2c /template
parentedb8c7a9f3a9e862355a0c30ea7ba040d48759ff (diff)
fake.rb.in: match spaces
* template/fake.rb.in: expanded macro result may have spaces between tokens. [ruby-dev:49047] [Bug #11243] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/fake.rb.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/template/fake.rb.in b/template/fake.rb.in
index a2de876..646a89f 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -8,8 +8,8 @@ end
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']%>"