From 9951a9a8ece77ad8aa2a8871b009e2f1fb776987 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 8 Jul 2021 23:33:55 -0700 Subject: Implement invokebuiltin --- bootstraptest/test_yjit.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 8cb4432b6a..6d507e17d7 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1210,6 +1210,18 @@ assert_equal 'foo123', %q{ make_str("foo", 123) } +# test invokebuiltin as used in struct assignment +assert_equal '123', %q{ + def foo(obj) + obj.foo = 123 + end + + struct = Struct.new(:foo) + obj = struct.new + foo(obj) + foo(obj) +} + # test invokebuiltin_delegate as used inside Dir.open assert_equal '.', %q{ def foo(path) -- cgit v1.2.3