summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-06-21 19:26:50 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:36 -0400
commit89110590a3864e4af1fd62df0182396b86ab17f3 (patch)
tree3e956973ec05c78d66fa50fb7b0f08d8f412ac90 /bootstraptest
parentda20ff1644a274aff4d5ad22c649c85d83e7e311 (diff)
Disable invokesuper codegen for now. Add test
The added test fails with SystemStackError with --yjit-call-threshold=1.
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index da66c06795..67d9b4867f 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -1204,3 +1204,23 @@ assert_equal '123', %q{
foo(Foo)
foo(Foo)
}
+
+# invokesuper edge case
+assert_equal '[:A, [:A, :B]]', %q{
+ class B
+ def foo = :B
+ end
+
+ class A < B
+ def foo = [:A, super()]
+ end
+
+ A.new.foo
+ A.new.foo # compile A#foo
+
+ class C < A
+ define_method(:bar, A.instance_method(:foo))
+ end
+
+ C.new.bar
+}