diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2022-12-15 18:10:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-15 18:10:28 -0500 |
| commit | 14158f1f8c50069f076f99e08405c5006ca65df9 (patch) | |
| tree | 8dcaed95be4b77d17619b20fe36c258c05bb2202 /test/ruby | |
| parent | e9ba3042e13313944fd2695731d0d7498532b80f (diff) | |
YJIT: Fix `obj.send(:call)`
All the method call types need to handle argument shifting in case they're
called by `.send`, and we weren't handling that in `OPTIMIZED_METHOD_TYPE_CALL`.
Lack of shifting caused the stack size assertion in gen_leave() to fail.
Discovered by Rails CI: https://buildkite.com/rails/rails/builds/91705#018516c4-f8f8-469e-bc2d-ddeb25ca8317/1920-2067
Diagnosed with help from `@eileencodes` and `@k0kubun`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6943
Merged-By: XrXr
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_yjit.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 3a5792cab4..0ad443c885 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -1022,6 +1022,12 @@ class TestYJIT < Test::Unit::TestCase RUBY end + def test_send_to_call + assert_compiles(<<~'RUBY', result: :ok) + ->{ :ok }.send(:call) + RUBY + end + private def code_gc_helpers |
