diff options
author | Jeremy Evans <code@jeremyevans.net> | 2023-12-08 14:30:39 -0800 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2024-01-24 18:25:55 -0800 |
commit | 4f77d8d3289ece0e3537d9273a5c745120bff59a (patch) | |
tree | ab56abca15cc1ad9a6277c6ff45c05d3dc226f4d /test/prism | |
parent | 0f90a24a816bec438edb272fb83f334484dfc285 (diff) | |
download | ruby-4f77d8d3289ece0e3537d9273a5c745120bff59a.tar.gz |
Do not use ruby2_keywords for ... argument forwarding
This allows ... argument forwarding to benefit from Allocationless
Anonymous Splat Forwarding, allowing the `f` call below to not
allocate an array or a hash.
```ruby
a = [1]
kw = {b: 2}
def c(a, b:)
end
def f(...)
c(...)
end
f(*a, **kw)
```
This temporarily skips prism locals tests until prism is changed
to use * and ** for ..., instead of using ruby2_keywords.
Ignore failures in rbs bundled gems tests, since they fail due
to this change.
Diffstat (limited to 'test/prism')
-rw-r--r-- | test/prism/locals_test.rb | 2 | ||||
-rw-r--r-- | test/prism/newline_test.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/test/prism/locals_test.rb b/test/prism/locals_test.rb index df391ca048..3dbe58f64d 100644 --- a/test/prism/locals_test.rb +++ b/test/prism/locals_test.rb @@ -83,7 +83,7 @@ module Prism filepath = File.join(base, relative) define_method("test_#{relative}") { assert_locals(filepath) } - end + end if false # skip until ... uses * and ** and not ruby2_keywords def setup @previous_default_external = Encoding.default_external diff --git a/test/prism/newline_test.rb b/test/prism/newline_test.rb index d998502869..a3fff7a1d1 100644 --- a/test/prism/newline_test.rb +++ b/test/prism/newline_test.rb @@ -11,6 +11,7 @@ module Prism filepaths.each do |relative| define_method("test_newline_flags_#{relative}") do + next if relative == 'locals_test.rb' assert_newlines(base, relative) end end |