mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
edb8c7a9f3
commit
9ddccb154e
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Jun 11 00:34:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@gmail.com>
|
||||
|
||||
* lib/mkmf.rb: revert r50804 because of build failure when specifying
|
||||
|
|
|
@ -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']%>"
|
||||
|
|
Loading…
Reference in a new issue