aboutsummaryrefslogtreecommitdiffstats
path: root/tool/ruby_vm
diff options
context:
space:
mode:
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r--tool/ruby_vm/helpers/dumper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb
index 8ac8b1c4ce..ccd5717cc8 100644
--- a/tool/ruby_vm/helpers/dumper.rb
+++ b/tool/ruby_vm/helpers/dumper.rb
@@ -32,8 +32,7 @@ class RubyVM::Dumper
rescue Errno::ENOENT
raise "don't know how to generate #{path}"
else
- match = ERB.version.match(/\Aerb\.rb \[(?<version>[^ ]+) /)
- if match && match[:version] >= '2.2.0' # Ruby 2.6+
+ if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
erb = ERB.new(src, trim_mode: '%-')
else
erb = ERB.new(src, nil, '%-')