1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

tool/insns2vm.rb: get rid of expanding paths

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-10-18 23:58:21 +00:00
parent 88a7271de4
commit 3c83a94ea9
4 changed files with 7 additions and 7 deletions

View file

@ -25,7 +25,7 @@ class RubyVM::Dumper
end
def new_erb spec
path = Pathname.new(__FILE__).realpath.dirname
path = Pathname.new(__FILE__).relative_path_from(Pathname.pwd).dirname
path += '../views'
path += spec
src = path.read mode: 'rt:utf-8:utf-8'
@ -37,7 +37,7 @@ class RubyVM::Dumper
else
erb = ERB.new(src, nil, '%-')
end
erb.filename = path.realpath.to_path
erb.filename = path.to_path
return erb
end
@ -87,7 +87,7 @@ class RubyVM::Dumper
def initialize dst
@erb = {}
@empty = new_binding
@file = cstr dst.realdirpath.to_path
@file = cstr dst.to_path
end
def render partial, opts = { :locals => {} }