summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-09-18 14:21:23 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2022-09-18 14:21:40 +0900
commit12023c833fb2ba3b50a34ab7f6b53f5f77d78658 (patch)
tree0aad997193a79f6ee93be785367148f345d1d2f3 /tool
parent62ec621f8c7457374d1f08aec97138ac1b7bdf2a (diff)
Revert "Preserve the directory structure under tool/ruby_vm/views"
This reverts commit 62ec621f8c7457374d1f08aec97138ac1b7bdf2a. will revisit this once fixing non-MJIT targets
Diffstat (limited to 'tool')
-rw-r--r--tool/ruby_vm/helpers/dumper.rb3
-rw-r--r--tool/ruby_vm/views/instruction.rb.erb (renamed from tool/ruby_vm/views/lib/mjit/instruction.rb.erb)0
2 files changed, 1 insertions, 2 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb
index c4294e1b3e..7aec9c7631 100644
--- a/tool/ruby_vm/helpers/dumper.rb
+++ b/tool/ruby_vm/helpers/dumper.rb
@@ -25,11 +25,10 @@ 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 += Pathname.pwd.join(spec).to_s.sub("#{srcdir}/", '')
+ path += File.basename(spec)
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/lib/mjit/instruction.rb.erb b/tool/ruby_vm/views/instruction.rb.erb
index 1c462de53a..1c462de53a 100644
--- a/tool/ruby_vm/views/lib/mjit/instruction.rb.erb
+++ b/tool/ruby_vm/views/instruction.rb.erb