summaryrefslogtreecommitdiff
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
-rw-r--r--tool/ruby_vm/views/lib/mjit/instruction.rb.erb (renamed from tool/ruby_vm/views/instruction.rb.erb)0
2 files changed, 2 insertions, 1 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb
index 7aec9c7631..c4294e1b3e 100644
--- a/tool/ruby_vm/helpers/dumper.rb
+++ b/tool/ruby_vm/helpers/dumper.rb
@@ -25,10 +25,11 @@ class RubyVM::Dumper
end
def new_erb spec
+ srcdir = Pathname.new(__dir__).parent.parent.parent
path = Pathname.new(__FILE__)
path = (path.relative_path_from(Pathname.pwd) rescue path).dirname
path += '../views'
- path += File.basename(spec)
+ path += Pathname.pwd.join(spec).to_s.sub("#{srcdir}/", '')
src = path.read mode: 'rt:utf-8:utf-8'
rescue Errno::ENOENT
raise "don't know how to generate #{path}"
diff --git a/tool/ruby_vm/views/instruction.rb.erb b/tool/ruby_vm/views/lib/mjit/instruction.rb.erb
index 1c462de53a..1c462de53a 100644
--- a/tool/ruby_vm/views/instruction.rb.erb
+++ b/tool/ruby_vm/views/lib/mjit/instruction.rb.erb