From 9fd0858c3b51946251e9ebaa494ae97392a56848 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 29 May 2018 23:28:50 +0000 Subject: [PATCH] fake.rb: fix RUBY_DESCRIPTION for MJIT * template/fake.rb.in: switch RUBY_DESCRIPTION at runtime depending on the MJIT status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- template/fake.rb.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/template/fake.rb.in b/template/fake.rb.in index 881e39ce46..d70053c264 100644 --- a/template/fake.rb.in +++ b/template/fake.rb.in @@ -15,7 +15,7 @@ if inc = arg['i'] scan(/rb_define_global_const\("(RUBY_\w+)",[^;]*?\bMK(?:INT|STR)\(([^()]*)\)/m) do |n, v| version[n] = src.value(v) end - version['RUBY_DESCRIPTION'] = src.value('description_with_jit') if RubyVM::MJIT.enabled? + arg['RUBY_DESCRIPTION_WITH_JIT'] = src.value('description_with_jit') end %>baseruby="<%=arg['BASERUBY']%>" _\ @@ -32,7 +32,9 @@ class Object CROSS_COMPILING = RUBY_PLATFORM constants.grep(/^RUBY_/) {|n| remove_const n} % arg['versions'].each {|n, v| - <%=n%> = <%=v.inspect%> + <%=n%> = <%if n=='RUBY_DESCRIPTION' %>RubyVM::MJIT.enabled? ? + <%=arg['RUBY_DESCRIPTION_WITH_JIT'].inspect%> : + <%end%><%=v.inspect%> % } end builddir = File.dirname(File.expand_path(__FILE__))