summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/helpers/dumper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/ruby_vm/helpers/dumper.rb')
-rw-r--r--tool/ruby_vm/helpers/dumper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb
index b622b89..ec7871d 100644
--- a/tool/ruby_vm/helpers/dumper.rb
+++ b/tool/ruby_vm/helpers/dumper.rb
@@ -32,7 +32,11 @@ class RubyVM::Dumper
rescue Errno::ENOENT
raise "don't know how to generate #{path}"
else
- erb = ERB.new src, nil, '%-'
+ if RUBY_VERSION >= '2.6'
+ erb = ERB.new(src, trim_mode: '%-')
+ else
+ erb = ERB.new(src, nil, '%-')
+ end
erb.filename = path.realpath.to_path
return erb
end