mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Introduce --basedir to insns2vm.rb
and leverage that to preserve the directory structure under tool/ruby_vm/views
This commit is contained in:
parent
12023c833f
commit
a988fe0b3e
5 changed files with 18 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue