summaryrefslogtreecommitdiff
path: root/tool/insns2vm.rb
blob: 027dc4e380a05ae8400136062617aff5625e4c04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!ruby

# This is used by Makefile.in to generate .inc files.
# See Makefile.in for details.

require_relative 'ruby_vm/scripts/insns2vm'

if $0 == __FILE__
  RubyVM::Insns2VM.router(ARGV).each do |(path, generator)|
    str = generator.generate path
    path.open 'wb:utf-8' do |fp|
      fp.write str
    end
  end
end