summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2023-04-19 10:40:40 -0700
committerJohn Hawthorn <john@hawthorn.email>2023-04-20 16:09:16 -0700
commit072ef7a1aad9c2a9296d1df29996da4068c50b94 (patch)
treed7652a39ed438c49893b9975f74ce332580b3721 /test
parenta42c36c0f1b0439826b37c868fac4ded41e7aa91 (diff)
downloadruby-072ef7a1aad9c2a9296d1df29996da4068c50b94.tar.gz
YJIT: invokesuper: Remove cme mid matching check
This check was introduced to match an assertion in the C YJIT when this was originally introduced. I don't believe it's necessary for correctness of the generated code. Co-authored-by: Adam Hess <HParker@github.com> Co-authored-by: Daniel Colson <danieljamescolson@gmail.com> Co-authored-by: Luan Vieira <luanzeba@github.com>
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_yjit.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index af7309385f..6700e58176 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -777,6 +777,25 @@ class TestYJIT < Test::Unit::TestCase
RUBY
end
+ def test_super_with_alias
+ assert_compiles(<<~'RUBY', insns: %i[invokesuper opt_plus opt_mult], result: 15)
+ class A
+ def foo = 1 + 2
+ end
+
+ module M
+ def foo = super() * 5
+ alias bar foo
+
+ def foo = :bad
+ end
+
+ A.prepend M
+
+ A.new.bar
+ RUBY
+ end
+
def test_super_cfunc
assert_compiles(<<~'RUBY', insns: %i[invokesuper], result: "Hello")
class Gnirts < String