Implement putspecialobject

This commit is contained in:
John Hawthorn 2021-06-19 14:03:06 -07:00 committed by Alan Wu
parent 3edf29668e
commit e18b0b6eba
2 changed files with 23 additions and 1 deletions

View file

@ -59,6 +59,10 @@ class TestYJIT < Test::Unit::TestCase
assert_compiles('$foo = 123; $foo', insns: %i[setglobal], result: 123)
end
def test_compile_putspecialobject
assert_compiles('-> {}', insns: %i[putspecialobject])
end
def test_compile_tostring
assert_no_exits('"i am a string #{true}"')
end
@ -201,7 +205,7 @@ class TestYJIT < Test::Unit::TestCase
iseq = RubyVM::InstructionSequence.of(_test_proc)
IO.open(3).write Marshal.dump({
result: result,
result: #{result == ANY ? "nil" : "result"},
stats: stats,
iseqs: collect_iseqs(iseq),
disasm: iseq.disasm