1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

tool/ruby_vm support for pre-2.1 BASERUBY

as requested by devs, support for BASERUBY prior to 2.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2018-01-12 08:38:11 +00:00
parent 069e9ff52c
commit 8a72c77c79
13 changed files with 121 additions and 112 deletions

View file

@ -19,10 +19,10 @@ class RubyVM::InstructionsUnifications
attr_reader :name
def initialize location:, signature:
@location = location
@name = namegen signature
@series = signature.map do |i|
def initialize opts = {}
@location = opts[:location]
@name = namegen opts[:signature]
@series = opts[:signature].map do |i|
RubyVM::BareInstructions.fetch i # Misshit is fatal
end
end
@ -34,7 +34,7 @@ class RubyVM::InstructionsUnifications
end
@instances = RubyVM::OptInsnUnifDef.map do |h|
new(**h)
new h
end
def self.to_a