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
|
||||
|
||||
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: '%')
|
||||
else
|
||||
erb = ERB.new(File.read(depend), nil, '%')
|
||||
@ -139,7 +139,7 @@ open(ARGV[0], 'wb') {|f|
|
||||
}
|
||||
if MODULE_TYPE == :static
|
||||
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: '%-')
|
||||
else
|
||||
erb = ERB.new(File.read(File.join($srcdir, filename)), nil, '%-')
|
||||
|
@ -1078,7 +1078,7 @@ if __FILE__ == $0
|
||||
end
|
||||
|
||||
libs1 = $".dup
|
||||
if RUBY_VERSION >= '2.6'
|
||||
if ERB.version[/\d+\.\d+/] >= '2.2'
|
||||
erb = ERB.new(src, trim_mode: '%')
|
||||
else
|
||||
erb = ERB.new(src, nil, '%')
|
||||
|
Loading…
x
Reference in New Issue
Block a user