summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-24 02:58:41 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-24 02:58:41 +0000
commitb81538d2592f24ae9927ead4fb4909cc74ada570 (patch)
treed5cf3fef85fe15d9726b3284d3bad4adf1d83755 /enc
parent22acbed6624e088543e8ceae3a1112ab08c69a16 (diff)
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
Diffstat (limited to 'enc')
-rwxr-xr-xenc/make_encmake.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/enc/make_encmake.rb b/enc/make_encmake.rb
index 06979db..dc4b5ef 100755
--- a/enc/make_encmake.rb
+++ b/enc/make_encmake.rb
@@ -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, '%-')