Judge ERB version not RUBY_VERSION but ERB.version
On cross compilation, ruby command uses fake RUBY_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
22acbed662
commit
b81538d259
@ -121,7 +121,7 @@ ENCS, ENC_DEPS = target_encodings
|
|||||||
ATRANS, TRANS = target_transcoders
|
ATRANS, TRANS = target_transcoders
|
||||||
|
|
||||||
if File.exist?(depend = File.join($srcdir, "depend"))
|
if File.exist?(depend = File.join($srcdir, "depend"))
|
||||||
if RUBY_VERSION >= '2.6'
|
if ERB.version[/\d+\.\d+/] >= '2.2'
|
||||||
erb = ERB.new(File.read(depend), trim_mode: '%')
|
erb = ERB.new(File.read(depend), trim_mode: '%')
|
||||||
else
|
else
|
||||||
erb = ERB.new(File.read(depend), nil, '%')
|
erb = ERB.new(File.read(depend), nil, '%')
|
||||||
@ -139,7 +139,7 @@ open(ARGV[0], 'wb') {|f|
|
|||||||
}
|
}
|
||||||
if MODULE_TYPE == :static
|
if MODULE_TYPE == :static
|
||||||
filename = "encinit.c.erb"
|
filename = "encinit.c.erb"
|
||||||
if RUBY_VERSION >= '2.6'
|
if ERB.version[/\d+\.\d+/] >= '2.2'
|
||||||
erb = ERB.new(File.read(File.join($srcdir, filename)), trim_mode: '%-')
|
erb = ERB.new(File.read(File.join($srcdir, filename)), trim_mode: '%-')
|
||||||
else
|
else
|
||||||
erb = ERB.new(File.read(File.join($srcdir, filename)), nil, '%-')
|
erb = ERB.new(File.read(File.join($srcdir, filename)), nil, '%-')
|
||||||
|
@ -1078,7 +1078,7 @@ if __FILE__ == $0
|
|||||||
end
|
end
|
||||||
|
|
||||||
libs1 = $".dup
|
libs1 = $".dup
|
||||||
if RUBY_VERSION >= '2.6'
|
if ERB.version[/\d+\.\d+/] >= '2.2'
|
||||||
erb = ERB.new(src, trim_mode: '%')
|
erb = ERB.new(src, trim_mode: '%')
|
||||||
else
|
else
|
||||||
erb = ERB.new(src, nil, '%')
|
erb = ERB.new(src, nil, '%')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user