aboutsummaryrefslogtreecommitdiffstats
path: root/tool/ruby_vm/helpers/dumper.rb
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-12 08:38:12 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-12 08:38:12 +0000
commitdb2cdf50c5c011e317850dad146d7d89b662f1a0 (patch)
tree4522e92604be44190102e2c7fac527494f343a23 /tool/ruby_vm/helpers/dumper.rb
parent7d6418a785841a0b8e8ff6fd9636e1c8f98aaa85 (diff)
downloadruby-db2cdf50c5c011e317850dad146d7d89b662f1a0.tar.gz
tool/ruby_vm support for pre-2.0 BASERUBY
This was not requested :) but actually easier than the previous so I just did it anyway. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm/helpers/dumper.rb')
-rw-r--r--tool/ruby_vm/helpers/dumper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb
index 3ba7310f56..2d6bb269f6 100644
--- a/tool/ruby_vm/helpers/dumper.rb
+++ b/tool/ruby_vm/helpers/dumper.rb
@@ -25,7 +25,7 @@ class RubyVM::Dumper
end
def new_erb spec
- path = Pathname.new __dir__
+ path = Pathname.new(__FILE__).realpath.dirname
path += '../views'
path += spec
src = path.read mode: 'rt:utf-8:utf-8'
@@ -88,8 +88,8 @@ class RubyVM::Dumper
@file = cstr dst.realdirpath.to_path
end
- def render partial, locals: {}
- return do_render "_#{partial}.erb", locals
+ def render partial, opts = { :locals => {} }
+ return do_render "_#{partial}.erb", opts[:locals]
end
def generate template