diff options
author | eileencodes <eileencodes@gmail.com> | 2024-07-02 13:31:15 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2024-07-02 11:48:43 -0700 |
commit | cc8c4a60b7fbddc04e2e09946a3c70029db35d3d (patch) | |
tree | 3db20fb89635f837990d35c0fbc24d7ff1a83480 /bootstraptest/test_method.rb | |
parent | 4d94d28a4a9b3f5d39144da581e735c82dbc1074 (diff) | |
download | ruby-cc8c4a60b7fbddc04e2e09946a3c70029db35d3d.tar.gz |
Calling into a C func shouldn't fast path when forwarding
When we forward calls to C functions if the callsite is a forwarding
site it might not always be a splat, so we can't use the fast path.
Fixes:
[ruby-core:118418]
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r-- | bootstraptest/test_method.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 846d8e36a9..a5ea35dd4b 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -1344,3 +1344,18 @@ assert_equal 'ok', %q{ C.new.foo } + +assert_equal 'ok', %q{ + class C + def initialize(a) + end + end + + def foo(...) + C.new(...) + :ok + end + + foo(*["bar"]) + foo("baz") +} |