summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-29 08:47:07 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-29 08:47:07 (GMT)
commit0342fcbd51f2f423541f862c8d8e35873d849963 (patch)
tree010fd450c9c0649fb98abf94757246c7b0400216 /template
parent2df80d30fe6ee217ae8a7b350601da620d775f35 (diff)
fake.rb: fix RUBY_DESCRIPTION for MJIT
* template/fake.rb.in: reflect MJIT to RUBY_DESCRIPTION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/fake.rb.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/template/fake.rb.in b/template/fake.rb.in
index 5e95530..881e39c 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -7,12 +7,15 @@ while /\A(\w+)=(.*)/ =~ ARGV[0]
end
if inc = arg['i']
src = inc == '-' ? STDIN.read : File.read(inc)
+ def src.value(name)
+ eval(self[/\bruby_#{name}(?:\[\])?\s*=\s*((?:"(?:\\.|[^\"\\])*"\s*)*(?=;)|[^{};]+)/m, 1].gsub(/#/, '\\#'))
+ end
arg['versions'] = version = {}
File.read(File.join(arg['srcdir'], 'version.c')).
scan(/rb_define_global_const\("(RUBY_\w+)",[^;]*?\bMK(?:INT|STR)\(([^()]*)\)/m) do |n, v|
- version[n] =
- eval(src[/\bruby_#{v}(?:\[\])?\s*=\s*((?:"(?:\\.|[^\"\\])*"\s*)*(?=;)|[^{};]+)/m, 1].gsub(/#/, '\\#'))
+ version[n] = src.value(v)
end
+ version['RUBY_DESCRIPTION'] = src.value('description_with_jit') if RubyVM::MJIT.enabled?
end
%>baseruby="<%=arg['BASERUBY']%>"
_\