Project

General

Profile

Bug #15406 » test.rb

wanabe (_ wanabe), 12/12/2018 08:43 PM

 
GC.stress = true

if ARGV[0]
nums = ARGV.map(&:to_i)
else
nums = [0, 13, 0]
end

scr = nums.map do |n|
"class A; " + "def a; end; " * n + "end; "
end.join

binary = RubyVM::InstructionSequence.compile(scr).to_binary
iseq = RubyVM::InstructionSequence.load_from_binary(binary)
(1-1/2)