diff options
author | John Hawthorn <[email protected]> | 2021-07-08 23:33:55 -0700 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:41 -0400 |
commit | 9951a9a8ece77ad8aa2a8871b009e2f1fb776987 (patch) | |
tree | e0801f5fa4751acb9df44f2222f231051c833781 /test | |
parent | 6055078b24ce9878aafad406fe72711311f9744f (diff) |
Implement invokebuiltin
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_yjit.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 4672e83c9c..ed83bd681a 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -310,6 +310,19 @@ class TestYJIT < Test::Unit::TestCase RUBY end + def test_invokebuiltin + assert_compiles(<<~RUBY) + def foo(obj) + obj.foo = 123 + obj.bar = 123 + end + + Foo = Struct.new(:foo, :bar) + foo(Foo.new(123)) + foo(Foo.new(123)) + RUBY + end + def test_super_iseq assert_compiles(<<~'RUBY', insns: %i[invokesuper opt_plus opt_mult], result: 15) class A |