diff options
author | Takashi Kokubun <[email protected]> | 2022-09-18 14:22:35 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2022-09-18 14:39:53 +0900 |
commit | a988fe0b3e4cd5a3955706affdc1f498ff9b5d77 (patch) | |
tree | cb8478fc417dc73bb495636b45b0393190c74926 /tool/ruby_vm/controllers | |
parent | 12023c833fb2ba3b50a34ab7f6b53f5f77d78658 (diff) |
Introduce --basedir to insns2vm.rb
and leverage that to preserve the directory structure under tool/ruby_vm/views
Diffstat (limited to 'tool/ruby_vm/controllers')
-rw-r--r-- | tool/ruby_vm/controllers/application_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/ruby_vm/controllers/application_controller.rb b/tool/ruby_vm/controllers/application_controller.rb index 25c10947ed..e03e54e397 100644 --- a/tool/ruby_vm/controllers/application_controller.rb +++ b/tool/ruby_vm/controllers/application_controller.rb @@ -16,10 +16,11 @@ require_relative '../models/typemap' require_relative '../loaders/vm_opts_h' class ApplicationController - def generate i, destdir + def generate i, destdir, basedir path = Pathname.new i dst = destdir ? Pathname.new(destdir).join(i) : Pathname.new(i) - dumper = RubyVM::Dumper.new dst + base = basedir ? Pathname.new(basedir) : Pathname.pwd + dumper = RubyVM::Dumper.new dst, base.expand_path return [path, dumper] end end |